wip: currently rewriting the project as a full stack application
tangled.org/kacaii.dev/sigo
gleam
1## Table of contents
2
3[[`/user`](routes/user.md)]
4
5## Overview
6
7| Route | Description | Method |
8| ------------------------------ | ----------------------------------------------------------- | ------------- |
9| /admin/setup | Create the first admin user | POST (JSON) |
10| /admin/signup | Register a new user account | POST (Form) |
11| /admin/users | List all registred users | GET |
12| /admin/users/{{id}} | Delete an user from the DataBase | DELETE |
13| /admin/users/{{id}} | Update the user data as an admin | PUT (JSON) |
14| /admin/users/{{id}}/status | Update the status of a user account | PUT (JSON) |
15| /admin/teams | Register a new brigade, with a leader and all their members | POST (Form) |
16| /admin/teams | Query all registered brigades | GET |
17| /admin/teams/{{id}}/status | Update the status of a brigade | PUT (JSON) |
18| /admin/teams/{{id}} | Remove a brigade | DELETE |
19| /user/login | Login with your user account | POST (Form) |
20| /user/profile | Retrieve data about the authenticated user | GET |
21| /user/profile | Update your profile | PUT(JSON) |
22| /user/roles | Get a list of all available roles | GET |
23| /user/{{id}}/occurrences | Find all occurrences applied by this user | GET |
24| /user/{{id}}/crew_members | List fellow brigade members of this user | GET |
25| /user/notification_preferences | Fetch authenticated user notification preferences | GET |
26| /user/notification_preferences | Update authenticated user notification preferences | PUT (JSON) |
27| /user/password | Update authenticated user password | PUT (JSON) |
28| /brigade/{{id}}/members | List brigade members | GET |
29| /dashboard/stats | Fetch stats for the dashboard page | GET |
30| /analysis/occurrence | Fetch data for analysis about occurrences | GET |
31| /occurrence/new | Register a new occurrence | POST (Form) |
32| /occurrence/resolve/{{id}} | Update an occurrence `resolved_at` field | POST / DELETE |