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:
parent
4e5dc610a3
commit
b7d6476a70
66 changed files with 2854 additions and 2336 deletions
38
src/jvmTest/resources/test.http
Normal file
38
src/jvmTest/resources/test.http
Normal 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}}
|
||||
|
||||
###
|
Loading…
Add table
Add a link
Reference in a new issue