DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

ref: 52a6bf5be6d777c072a7ebde1261e8843fc495ef deck-builder/sdbapi/README.md -rw-r--r-- 729 bytes
52a6bf5bJonni Liljamo feat(sdbapi): replace gorm.Model with own fields 1 year, 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Deck Builder API

## Deployment
Configure `SDBAPI_JWT_SECRET` in `docker-compose.yaml` to be randomized.

## API Doc
| path | action | who can |
|------|--------|---------|
| GET /info | get API info | public |
|-|-|-|
| POST /user/register | register a user | public |
| POST /user/token | get the token of a user, aka login | public |
| GET /user/:id | get generic user info | public |
| GET /user/_/:id | get private user info | id owner |
|-|-|-|
| GET /game/:id | get game info | registered users |
| GET /game/get_forming | get all games that are forming | registered users |
| POST /game/create | create a game | registered users |
| PATCH /game/:id/state | change the state of a game | only the game creator, aka P1 |