Backend service for splatapp
Head over to swagger
License: MIT
Get all users from cache
Gets all users from cache.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
token | header | Authorization token | Yes | string |
Code | Description | Schema |
---|---|---|
200 | OK | [ controllers.userType ] |
404 | Not Found | controllers.errorResult |
Security Schema | Scopes |
---|---|
ApiKeyAuth |
Get a User by id from cache
Gets a user from the cache if there is a hit. This is the default endpoint.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
id | path | userId | Yes | string |
token | header | Authorization token | Yes | string |
Code | Description | Schema |
---|---|---|
200 | OK | controllers.userType |
404 | Not Found | controllers.errorResult |
Security Schema | Scopes |
---|---|
ApiKeyAuth |
Get all task activities
Gets all tasks from the database. Represents all activities.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
token | header | Authorization token | Yes | string |
Code | Description | Schema |
---|---|---|
200 | OK | [ controllers.taskType ] |
404 | Not Found | controllers.errorResult |
Security Schema | Scopes |
---|---|
ApiKeyAuth |
Add a task
Adds task to the database
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
data | body | Task details | Yes | controllers.taskAddType |
token | header | Authorization token | Yes | string |
Code | Description | Schema |
---|---|---|
200 | OK | controllers.taskType |
400 | Bad Request | controllers.errorResult |
Security Schema | Scopes |
---|---|
ApiKeyAuth |
Get all Tasks of a particular user
Gets tasks of a particular user via userId.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
id | path | taskId | Yes | string |
token | header | Authorization token | Yes | string |
Code | Description | Schema |
---|---|---|
200 | OK | [ controllers.taskType ] |
404 | Not Found | controllers.errorResult |
Security Schema | Scopes |
---|---|
ApiKeyAuth |
Sets a task to be hidden
Updates the task via provided taskId to be hidden.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
id | path | userId | Yes | string |
token | header | Authorization token | Yes | string |
Code | Description | Schema |
---|---|---|
200 | OK | controllers.taskType |
404 | Not Found | controllers.errorResult |
Security Schema | Scopes |
---|---|
ApiKeyAuth |
Get all users
Gets all users from database directly. Use it to test whether cache is updated correctly.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
token | header | Authorization token | Yes | string |
Code | Description | Schema |
---|---|---|
200 | OK | [ controllers.userType ] |
404 | Not Found | controllers.errorResult |
Security Schema | Scopes |
---|---|
ApiKeyAuth |
Delete a user given a userId
Deletes a user via userId. Only admin access.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
id | path | userId | Yes | string |
adminId | query | adminId | Yes | string |
token | header | Authorization token | Yes | string |
Code | Description | Schema |
---|---|---|
200 | OK | controllers.userType |
404 | Not Found | controllers.errorResult |
Security Schema | Scopes |
---|---|
ApiKeyAuth |
Get a User by id from database
Gets a user from database. Use this to check if the cache is updated compared to the database.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
id | path | userId | Yes | string |
token | header | Authorization token | Yes | string |
Code | Description | Schema |
---|---|---|
200 | OK | controllers.userType |
404 | Not Found | controllers.errorResult |
Security Schema | Scopes |
---|---|
ApiKeyAuth |
Increase points of a user
Increase points of a user by specified amount.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
id | path | userId | Yes | string |
pointstoadd | query | pointsToAdd | Yes | string |
token | header | Authorization token | Yes | string |
Code | Description | Schema |
---|---|---|
200 | OK | controllers.userType |
404 | Not Found | controllers.errorResult |
Security Schema | Scopes |
---|---|
ApiKeyAuth |
User log in
Responds with user details, including OAuth2 tokens.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
data | body | Sign in credentials | Yes | controllers.userLogin |
Code | Description | Schema |
---|---|---|
200 | OK | controllers.userType |
500 | Internal Server Error | controllers.errorResult |
Update the module import link of a user
Updates the module import link of the userId specified.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
id | path | userId | Yes | string |
linktoadd | query | linkToAdd | Yes | string |
token | header | Authorization token | Yes | string |
Code | Description | Schema |
---|---|---|
200 | OK | controllers.userType |
404 | Not Found | controllers.errorResult |
Security Schema | Scopes |
---|---|
ApiKeyAuth |
User sign up
Responds with userId
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
data | body | New user credentials | Yes | controllers.userSignUp |
Code | Description | Schema |
---|---|---|
200 | OK | controllers.signUpResult |
400 | Bad Request | controllers.errorResult |
Modify user particulars
Change user particulars
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
id | path | userId | Yes | string |
first_name | query | First name | No | string |
last_name | query | Last name | No | string |
query | No | string | ||
password | query | Password | No | string |
token | header | Authorization token | Yes | string |
Code | Description | Schema |
---|---|---|
200 | OK | controllers.userType |
404 | Not Found | controllers.errorResult |
Security Schema | Scopes |
---|---|
ApiKeyAuth |
Name | Type | Description | Required |
---|---|---|---|
error | string | No |
Name | Type | Description | Required |
---|---|---|---|
InsertedID | string | No |
Name | Type | Description | Required |
---|---|---|---|
duration | string | No | |
first_name | string | Yes | |
hidden | boolean | No | |
last_name | string | Yes | |
moduleCode | string | No | |
taskName | string | No | |
user_id | string | No |
Name | Type | Description | Required |
---|---|---|---|
created_at | string | No | |
duration | string | No | |
first_name | string | Yes | |
hidden | boolean | No | |
id | string | No | |
last_name | string | Yes | |
moduleCode | string | No | |
taskName | string | No | |
updated_at | string | No | |
user_id | string | No |
Name | Type | Description | Required |
---|---|---|---|
string | Yes | ||
password | string | Yes |
Name | Type | Description | Required |
---|---|---|---|
string | No | ||
first_name | string | Yes | |
last_name | string | Yes | |
password | string | No |
Name | Type | Description | Required |
---|---|---|---|
Password | string | Yes | |
created_at | string | No | |
string | Yes | ||
first_name | string | Yes | |
id | string | No | |
last_name | string | Yes | |
points | integer | No | |
refresh_token | string | No | |
timetable | string | No | |
token | string | No | |
updated_at | string | No | |
user_id | string | No |