Add repositories

- Make model classes imutable
- Move model classes to common module
- Add repositories for backend and frontend
  - Backend repositories communicates with sqlite
  - Frontend repositories commuincates with rest api
- Add rest api
  - Authentication via cookies
- Add coroutines to forntend
- Add change listener to repositories
- Transmit change events to frontend repositories via websocket
- Switch to server side sessions
- Move setup from ui to cli
This commit is contained in:
Lars Westermann 2019-05-12 16:40:21 +02:00
parent 4e5dc610a3
commit b7d6476a70
Signed by: lars.westermann
GPG key ID: 9D417FA5BB9D5E1D
66 changed files with 2854 additions and 2336 deletions

View file

@ -0,0 +1,38 @@
GET http://localhost:8080/api/rooms
###
POST http://localhost:8080/api/authenticate
Content-Type: application/json
{
"username": "admin",
"password": "admin"
}
> {%
client.assert(response.body.OK === true, "Login failed!");
client.global.set("auth_token", response.headers.valueOf("Set-Cookie"));
%}
###
POST http://localhost:8080/api/rooms
Content-Type: application/json
Cookie: {{auth_token}}
{
"name": "E007",
"places": 20,
"projector": true
}
###
POST http://localhost:8080/api/room/2/delete
Content-Type: application/json
Cookie: {{auth_token}}
###