SmartExchange exposes the following API end points to the outside world:
Name
|
Description
|
Authorization
|
Route
|
Register user
|
Registers new user taking in email, password and name as inputs
|
No
|
/api/register
|
Login user
|
Logins in user taking in email and password as inputs
|
No
|
/api/login
|
Get threads
|
Gets a list of threads in the database
|
No
|
/api/threads
|
Create thread
|
Creates a new thread by taking title, description and tags as inputs
|
Yes
|
/api/thread
|
Edit thread
|
Updates an existing thread
|
Yes
|
/api/thread/threadId
|
Delete thread
|
Deletes an existing thread
|
Yes
|
/api/thread/threadId
|
Create message
|
Creates a new message on a thread by passing in the message as input
|
Yes
|
/api/message
|
Edit message
|
Updates an existing message
|
Yes
|
/api/message/messageId
|
Delete message
|
Deletes an existing message
|
Yes
|
/api/message/messageId
|