https://devdesklambda.herokuapp.com/
Server Running Check GET /
POST /api/auth/register
BODY
{ "username": <username (string)>, "password": <pasword (string)>, "first_name": <first_name (string)>, "last_name": <Last_name (string)>, "role": <role (integer) : defaults to student, student = 1, helper = 2> }
RETURNS
{ "id": <username (string)>, "title": <username (string)>, "description": <username (string)>, "steps_taken": <username (string)>, "category": <username (string)>, "status": <username (string)>, "creator_id": <user (string)> }
POST /api/auth/login
BODY
{ "username": <username (string)>, "password": <pasword (string)> }
RETURNS
{ "message": <welcome name (string)> , "token": <JWT token (string)> }
POST /api/tickets/submit
BODY
{ "title": <title (string)>, "description": <description (string)>, "steps_taken": <steps_taken (string)>, "category": <category (string)>, "status": <status (string)>, "creator_id": <user_id of creator (integer)> }
RETURNS
{ "id": <id (integer)>, "title": <title (string)>, "description": <description (string)>, "steps_taken": <steps_taken (string)>, "category": <category (string)>, "status": <status (string)>, "creator_id": <user_id of creator (integer)> }
GET /api/tickets
RETURNS array of all tickets
{ "id": <id (integer)>, "title": <title (string)>, "description": <description (string)>, "steps_taken": <steps_taken (string)>, "category": <category (string)>, "status": <status (string)>, "creator_id": <user_id of creator (integer)> }
POST /api/tickets/submit/comment
BODY
{ "comment": <comment (string)>, "user_id": <user_id of ticket creator (integer)>, "ticket_id": <ticket_id (integer)> }
RETURNS
{ "id": <id (integer)>, "comment": <comment (string)>, "user_id": <user_id of ticket creator (integer)>, "ticket_id": <ticket_id (integer)> }
GET /api/tickets/comments
RETURNS array of all comments
{ "id": <id (integer)>, "comment": <comment (string)>, "user_id": <user_id of ticket creator (integer)>, "ticket_id": <ticket_id (integer)> }
PUT /api/tickets/:id
BODY
{ "title": <title (string)>, "description": <description (string)>, "steps_taken": <steps_taken (string)>, "category": <category (string)>, "status": <status (string)>, "creator_id": <user_id of creator (integer)> }
RETURNS
[ { "id": <id (integer)>, "title": <title (string)>, "description": <description (string)>, "steps_taken": <steps_taken (string)>, "category": <category (string)>, "status": <status (string)>, "creator_id": <user_id of creator (integer)> } ]
PUT /api/tickets/comments/:id
BODY
{ "comment": <comment (string)>, "user_id": <user_id of ticket creator (integer)>, "ticket_id": <ticket_id (integer)> }
RETURNS
[ { "id": <id (integer)>, "comment": <comment (string)>, "user_id": <user_id of ticket creator (integer)>, "ticket_id": <ticket_id (integer)> } ]
DELETE /api/tickets/:id
RETURNS
{ "message": <message (string)> }
DELETE /api/tickets/comments/:id
RETURNS
{ "message": <message (string)> }