Skip to content
Snippets Groups Projects
Commit f628d022 authored by Bernard Roland (Student Com20)'s avatar Bernard Roland (Student Com20)
Browse files

Finished the API documentation

parent 9c888326
No related branches found
No related tags found
No related merge requests found
## Work
### GET `/work` [requires authentication]
Get the information on the currently open work item of the authenticated user. If no item is open,
404 will be returned.
#### Response body
```typescript
interface Body {
status: string;
work: {
id: string;
task: string;
user: string;
started: number;
finished?: number;
};
}
```
### POST `/work/start` [requires authentication]
Create a new work item with the given data. All open work items for the authenticated user will
also be closed in turn. On successful creation the id of the new work item will be returned.
#### Request body
```typescript
interface Body {
task: string;
}
```
#### Response body
```typescript
interface Body {
status: string;
id: string;
}
```
### PUT `/work/finish` [requires authentication]
Finish the currently open work of the authenticated user. If no item is open, 404 will be returned.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment