Backend Routes - Dedition/WhoDis Wiki

API Endpoints

Session

  • POST /api/session - Log in
  • DELETE /api/session - Log out

Servers

  • GET /api/servers - Return all servers
  • GET /api/servers/:id - Returns a specific server
  • POST /api/servers - Creates a server
  • PATCH /api/servers/:id - Edits a server
  • DELETE /api/servers/:id - Deletes a server

Server_Members

  • POST /api/server_members - Join a server
  • GET /api/server_members - Gets all users in a server
  • DELETE /api/server_members/:id - Leave a server

Channels

  • GET /api/channels- Return all channels
  • GET /api/channels/:id - Returns a specific channel
  • POST /api/channels- Creates a channel
  • PUT /api/channels/:id - Edits a channel
  • DELETE /api/channels/:id - Deletes a channel

Channel_messages

  • POST /api/messages - Creates a message
  • PATCH /api/messages/:id - Edits a message
  • DELETE /api/messages/:id - Deletes a message

Friends

  • GET /api/friends - Return all user's friends
  • POST /api/friends - Add a friend
  • DELETE /api/friends/:id - Remove a friends