Closed j-chad closed 2 years ago
Update: For post endpoints, all users would have the ability to update/delete other user's post. (Not sure whether this should be fixed tho)
POST /api/v1/users :
{
"username":"john",
"displayName":"lol",
"email": "dev111@test.com",
"plaintextPassword":"123456www"
}
POST /api/v1/users/login :
{
"username":"john",
"plaintextPassword":"123456www"
}
POST /api/v1/posts
{
"userID": "john's id",
"communityID": "UOA",
"title": "lol",
"text": "lol",
"images": ["image string"]
}
POST /api/v1/posts/:id/comments
{
"authorID": "john's id",
"username": "john",
"title": "lol",
"bodyText": "lol",
"attachments": ["image"]
}
Endpoint for updating a comment has been changed from : PATCH /api/v1/posts/:id/comments/:id to: PATCH /api/v1/posts/comments/:id
POST /api/v1/communities
{
"userID": "623efb5efc2d42cdd9456ba2",
"name": "uoa",
"description": "akjsdhaskjdhaskd",
"members": 25,
"img": "ashdksjah"
}
the members shouldn't be part of the post request
also why does it need userid?
also why does it need userid?
Should this endpoint be authenticated? If yes then it would need userID...
that will be passed with the authentication header
Is your feature request related to a problem? Please describe. The backend endpoints are currently not consistently working and do not provide the front end with sufficient information.
Describe the solution you'd like Add endpoints:
PATCH /api/v1/users/:id/communities
GET /api/v1/users/:id/communities
Verify functionality of the existing endpoints:
GET /api/v1/posts
POST /api/v1/posts
GET api/v1/posts/:id
PATCH api/v1/posts/:id
DELETE api/v1/posts/:id
GET /api/v1/posts/:id/comments
POST /api/v1/posts/:id/comments
PATCH /api/v1/posts/:id/comments/:id
POST /api/v1/users
POST /api/v1/users/login
POST /api/v1/users/logout
GET /api/v1/users/:id
PATCH /api/v1/users/:id
DELETE /api/v1/users/:id
Additional context FE Issue
Checklist: