-
Notifications
You must be signed in to change notification settings - Fork 0
Backend Routes
Chris Vo edited this page Jan 6, 2020
·
3 revisions
-
GET /
StaticPagesController#root
-
GET /api/users/user
- show current user's information -
POST /api/users
- sign up
-
POST /api/session
- log in -
DELETE /api/session
- log out
-
GET /api/servers
- shows all servers affiliated with current user -
GET /api/servers/:serverId
- shows a server and its content -
POST /api/servers
- creates a new server -
PATCH /api/servers/:serverId
- edit an existing server -
DELETE /api/servers/:serverId
- delete an existing server
-
GET /api/servers/:serverId/channels
- shows all channels affiliated with a server -
GET /api/servers/:serverId/channels/:channelId
- shows a channel and its content -
POST /api/servers/:serverId/channels
- create a new channel -
PATCH /api/servers/:serverId/channel/:channelId
- edit an existing channel -
DELETE /api/servers/:serverId/channel/:channelId
- delete an existing channel
-
GET /api/servers/:serverId/channels/:channelId/messages
- shows all messages affiliated with a server -
POST /api/servers/:serverId/channels/:channelId/messages
- write a new message -
PATCH /api/servers/:serverId/channels/:channelId/messages/:messageId
- edit an existing message (only current user can edit their own message) -
DELETE /api/servers/:serverId/channels/:channelId/messages/:messageId
- delete an existing message (only current user can delete their own message. Server owners can delete any message)
-
GET /api/directmessages
- show all direct messages -
POST /api/directmessages
- create a new message -
PATCH /api/directmessages/:directmessageId
- edit an existing message (only current user can edit their own message) -
DELETE /api/directmessages/:directmessageId
- delete an existing message (only current user can delete their own message)