-
Notifications
You must be signed in to change notification settings - Fork 0
API Documentation
Christo Grabowski edited this page Feb 22, 2023
·
1 revision
Logs in a user and returns the user's information
- Method: Post
- URL: /api/auth/login
- Body:
{
"email": "[email protected]",
"password": "testpassword"
}
- Status Code: 200
- Body:
{
"email": "[email protected]",
"id": 1,
"username": "TestUser"
}
- Status Code: 401
- Body:
{
"errors": "Yer kredentials were wrong. Are you a humie spy?"
}
- Status Code: 401
- Body:
{
"errors":
["Yer password is required", "Yer email is required"]
}
Creates a new User and logs them in.
- Method: POST
- URL: /api/auth/signup
- Body:
{
"username": "OrksyUser",
"email": "[email protected]",
"password": "somePassword"
}
- Status Code: 200
- Body:
{
"email": "[email protected]",
"id": 1,
"username": "OrksyUser"
}
- Status Code: 401
- Body:
{
"errors": [ "Username is required", "Email is required" ]
}