Backend Routes - dtannyc1/Davescord GitHub Wiki
HTML
API
users
GET /api/users
for index of users #index
GET /api/users/:userId
for a specific user's information #show
POST /api/users
to create a new user #create
session
GET /api/session
to restore session #show
POST /api/session
to log in #create
DELETE /api/session
to log out #destroy
servers
GET /api/servers
for index of servers for the logged in user #index
GET /api/servers/:serverId
for a specific server's information #show
POST /api/servers
to create a new server #create
PATCH /api/servers/:serverId
to update an existing server #update
DELETE /api/servers/:serverId
to delete an existing server #destroy
channels
GET /api/channels
for index of channels #index
POST /api/channels
to create a new channel #create
PATCH /api/channels/:channelId
to update an existing channel #update
DELETE /api/channels/:channelId
to delete an existing channel #destroy
messages
GET /api/channels/:channelId/messages
for index of messages for a channel #index
POST /api/channels/:channelId/messages
to create a new message #create
PATCH /api/messages/:messageId
to update an existing message #update
DELETE /api/messages/:messageId
to delete an existing message #destroy
private_chats
GET /api/privateChats
for index of private conversations #index
POST /api/privateChats
to create a new private conversation #create
PATCH /api/privateChats/:privateChatId
to update an existing private conversation #update
DELETE /api/privateChats/:privateChatId
to delete an existing private conversation #destroy
private_messages
GET /api/privateChats/:privateChatId/privateMessages
for index of messages for a private chat #index
POST /api/privateChats/:privateChatId/privateMessages
to create a new private message #create
PATCH /api/privateMessages/:privateMessageId
to update an existing private message #update
DELETE /api/privateMessages/:privateMessageId
to delete an existing private message #destroy
subscriptions
GET /api/subscriptions
for index of subscriptions for the logged in user #index
POST /api/subscriptions
to create a new subscription #create
DELETE /api/subscriptions/:subscriptionId
to destroy an existing subscription #destroy
friends
GET /api/friends
for index of friends for the logged in user #index
POST /api/friends
to create a new friend request #create
PATCH /api/friends/:friendId
to update a friend request status #update
DELETE /api/friends/:friendId
to delete a friend #destroy