To test the application, clone repository and add the firebase file which is attached to the email.
- Build docker:
docker build . -t magiclab
- Run docker:
docker run -p 8080:8080 -d magiclab
Save and read endpoints protected by authentication mechanism. Make sure to provide generated token at the headers section x-access-token area after login.
POST /save
Parameter | Type |
---|---|
id |
Number |
gold |
Number |
diamond |
Number |
username |
String |
Method: POST
Body:
{
"id": 1,
"gold": 123,
"diamond": 15,
"username": "magic"
}
Response
Status: 200
{
"Saved successfully!"
}
POST /read?id=1
Response
Status: 200
{
"id": 1,
"gold": 123,
"diamond": 15,
"username": "magic"
}