Backend Routes - alex-ciminillo/freeBook GitHub Wiki
Backend Routes
HTML
GET / - StaticPagesController#root
API Endpoints
users
GET /api/users/:id - get user info
POST /api/users - sign up
PATCH /api/users - edit user info
session
POST /api/session - log in
DELETE /api/session - log out
posts
GET /api/posts - returns relevant posts (filtered by data/params)
GET /api/posts/:id - returns post
POST /api/posts - creates a post
PATCH /api/posts/:id - edit a post
DELETE /api/posts/:id - remove a post
friendships
POST /api/friendships - creates a friendship
DELETE /api/friendships/:id - remove a friendship