Backend Routes - AmandaMitchell707/ScoutMySkate GitHub Wiki
Backend Routes
HTML
GET /StaticPagesController#root
API Endpoints
users
-
GET /api/users- allows users to search for other users to add as friends -
GET /api/users/:id- allows user to view their private dashboard -
POST /api/users- allows users to sign up
session
POST /api/session- log inDELETE /api/session- log out
routes
GET /api/routes- shows list of routesGET /api/routes/:id- shows a routePOST /api/routes- creates a routesPATCH /api/routes/:id- edits a routesDELETE /api/routes/:id- removes a routes
comments
POST /api/routes/:route_id/comments- comment on a routeDELETE /api/routes/:route_id/comments- delete a comment
friend
GET /api/users/:user_id/friends- shows list of a user's friendsPOST /api/users/:user_id/friends- user can add a friendDELETE /api/users/:user_id/friends- user can delete a friend