Skip to content

Backend Routes

natedonato edited this page May 3, 2019 · 1 revision

HTML

* get / (root)

API Endpoints

Users

* get api/users/:id (display user info)

* post api/users (sign up / register new user)

Session

* post /api/session (login)

* delete api/session (logout)

PHOTOS

**get api/photos (get relevant photos)**

**get api/photo/:id (get specific photo)**

**post api/photos (post a new photo)**

**delete api/photo/:id (delete a photo)**

LIKES

**get api/photo/:id/likes (get a photos likes)**

**post api/photo/:id/likes (like a photo)**

**delete api/photo/:id/like/:likeid (unlike a photo)**

FOLLOWS

**get api/user/:id/follows (get a users follows)**

**post api/user/:id/follows (follow a user)**

**delete api/user/:id/follows/:followid (unlike a photo)**

COMMENTS

**get api/photo/:id/comments (get comments on photo)**

**post api/photo/:id/comments (make a comment on photo)**

**delete api/photo/:id/comment/:commentid (delete a comment)**

Clone this wiki locally