Skip to content

Kiberia/giftshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

docker-compose

Use docker_compose to up database with default data from create.sql, all settings can be found in docker-compose.yml

docker-compose up -d

jooq

I use JOOQ, so for entities codegen you should launch

maven jooq-codegen:generate -Dspring.datasource.url=jdbc:postgresql://localhost:5432/warrobots -Dspring.datasource.username=user -Dspring.datasource.password=password -f pom.xml

Launch

Override if needed

-Dspring.datasource.url=jdbc:postgresql://localhost:5432/warrobots -Dspring.datasource.username=user -Dspring.datasource.password=password

API

Without swagger configuration.

Test examples can be found in ./requests

server.port=9831 by default

API for getting current state of database

Users list: GET /api/reference/list/users Items list: GET /api/reference/list/items

Business logic

Buy item: POST /api/buy

{
  "userGuid": "",
  "itemId": 0
}

Gift item: POST /api/gift

{
  "senderUserGuid": "",
  "acceptorUserGuid": "",
  "itemId": 0
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages