swsnu / swpp2020-team13

Goaling Ball: Your goal management service.
0 stars 3 forks source link

There will be no extra API for adding and deleting Tags #9

Closed ChanwooLucioLee closed 3 years ago

ChanwooLucioLee commented 3 years ago

This is a follow up for issue#4 (API for adding and deleting tags)

Tags will be a field in Goal and you will be able to fetch them by simply goal.tags (goal is an instance that is fetched from backend by /api/goals/<goal_id/ )

There will be no partial update for tags. You should send a full list of tags if you want to update them. ex) If your current tags are: ["apple", "banana"] and you want to add "orange" and remove "banana", then you should send like below: tags: ["apple", "orange"]

The logic to handle it will be implemented in frontend.

For your information, that is exactly how you update day_of_week field in Task.

ChanwooLucioLee commented 3 years ago

JSON format for a list: ex) goal_data = { "title": "GOAL TITLE", "tags": ["apple", "banana"] }