Skip to content

Psijic/spring-server

Repository files navigation

Spring Server

Database is denormalized and has no duplicates check. All the data is in JSON format.

Endpoints:

GET http://localhost:8080/available - get all non-booked phones

GET http://localhost:8080/unavailable - get all booked phones

GET http://localhost:8080 - get all phones

POST samples:

Book a phone: phone ID, user name is required

curl -X POST -H "Content-Type: application/json" -d '{"id":"beff85af-488e-4df0-a652-af468f7cbda0", "name":"John"}' --location "http://localhost:8080/book"

Unbook (release) a phone: phone ID is required

curl -X POST -H "Content-Type: application/json" -d '{"id":"beff85af-488e-4df0-a652-af468f7cbda0"}' --location "http://localhost:8080/unbook"

fill_db.sh is to fill database with mock phones

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published