Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Important] Regarding Backend Review API #31

Open
jyeok opened this issue Nov 4, 2019 · 1 comment
Open

[Important] Regarding Backend Review API #31

jyeok opened this issue Nov 4, 2019 · 1 comment
Assignees
Labels
backend implementation of backend documentation Improvements or additions to documentation enhancement New feature or request

Comments

@jyeok
Copy link
Contributor

jyeok commented Nov 4, 2019

I think some modification / clarification are needed:

clarification
range of rating is 0 to 5, inclusive.
form of date is YYYY-MM-DD, leading zero inclusive.

modification
When getting review(s) I think the frontend doesn't have to know the id of author, restaurant, menu. Instead it should be "author": string, "restaurant": string, "menu": string.

api/review/

  • POST : require json {"restaurant_name": string, "menu_name": string, "content": string, "rating": float}, return json {"id": id, "author": id, "restaurant": id, "menu": id, "content": string, "rating": float, "date": string}
  • GET : return json list: each element: {"id": id, "author": id, "restaurant": id, "menu": id, "content": string, "image": url, "rating": float, "date": string}

api/review/:review_id/

  • GET : return json response {"id": id, "author": id, "restaurant": id, "menu": id, "content": string, "image": url, "rating": float, "date": string}
  • PUT : require json {"restaurant_name": string, "menu_name": string, "content": string, "rating": float}
    return {"id": id, "author": id, "restaurant": id, "menu": id, "content": string, "rating": float, "date": string}

api/review/:review_id/image/

  • POST : require multipart/form-data "image":file, return {"id": id, "author": id, "restaurant": id, "menu": id, "image": url, "content": string, "rating": float, "date": string}
@jyeok jyeok added documentation Improvements or additions to documentation enhancement New feature or request backend implementation of backend labels Nov 4, 2019
@ByungHeeCha
Copy link
Contributor

OK. I will change it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend implementation of backend documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants