Back End Routes
Mitul Mistry edited this page Dec 7, 2021
·
8 revisions
These are the back end routes that will be implemented using the Rails router.
-
GET /
StaticPagesController#root
-
GET /api/v1/users
- return users -
GET /api/v1/users/:id
- return user -
POST /api/v1/users
- sign up -
PUT/PATCH /api/v1/users
- edit user profile -
DELETE/api/v1/users
- delete user account
-
POST /api/v1/session
- log in -
DELETE /api/v1/session
- log out
-
GET /api/v1/artworks
- return relevant artworks (filtered by data/params) -
GET /api/v1/artworks/search
- return relevant artworks based on search query (?q=cats
) -
GET /api/v1/artworks/:id
- return an artwork
-
GET /api/v1/saved_artworks
- return saved artworks -
POST /api/v1/saved_artworks
- save an artwork -
DELETE /api/v1/saved_artworks/:id
- unsave an artwork
-
GET /api/v1/collections
- return relevant collections (filtered by data/params) -
GET /api/v1/collections/liked
- return liked collections -
GET /api/v1/collections/:id
- return a collection -
POST /api/v1/collections
- create a collection -
PUT/PATCH /api/v1/collections/:id
- edit a collection -
DELETE /api/v1/collections/:id
- delete a collection
-
POST /api/v1/collection_likes
- like a collection -
DELETE /api/v1/collection_likes/:id
- unlike a collection
-
GET /api/v1/collection_comments
- return collection comments -
GET /api/v1/collection_comments/collection/:id
- return comments for a particular collection -
GET /api/v1/collection_comments/:id
- return a collection comment -
POST /api/v1/collection_comments
- create a comment on a collection -
PUT/PATCH /api/v1/collection_comments
- edit a comment on a collection -
DELETE /api/v1/collection_comments/:id
- delete a comment on a collection