Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

new Item tag/category relations and APIs#305

Merged
yiyione merged 4 commits intomasterfrom
yiyi/item_tag_category_table_and_init
Jun 1, 2021
Merged

new Item tag/category relations and APIs#305
yiyione merged 4 commits intomasterfrom
yiyi/item_tag_category_table_and_init

Conversation

@yiyione
Copy link
Contributor

@yiyione yiyione commented May 31, 2021

new relations:
ItemTagRelation / ItemCategoryRelation

image

New APIs

router
.route('/items/:itemId/tag')
.get(token.checkAuthAndGetUserInfo, itemController.listTags); // list item's all tags

router
.route('/items/:itemId/tag/:tagId')
.post(token.checkAuthAndGetUserInfo, itemController.addTag) // add tag to item
.delete(token.checkAuthAndGetUserInfo, itemController.deleteTag); // delete tag from item

router
.route('/items/:itemId/category')
.get(token.checkAuthAndGetUserInfo, itemController.listCategories); // list item's all categories

router
.route('/items/:itemId/category/:categoryId')
.post(token.checkAuthAndGetUserInfo, itemController.addCategory) // add category to item
.delete(token.checkAuthAndGetUserInfo, itemController.deleteCategory); // delete category from item

@yiyione yiyione requested a review from debuggy May 31, 2021 13:19
@yiyione yiyione requested a review from a team as a code owner May 31, 2021 13:19
Copy link

@hippogr hippogr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@yiyione yiyione merged commit 1373e13 into master Jun 1, 2021
@yiyione yiyione deleted the yiyi/item_tag_category_table_and_init branch June 1, 2021 08:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants