Skip to content

heydp/OMS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OMS

Use Server - postgres

Use DB - ordertry

port - 5432

To run the program - go run main.go

Post Order - curl --location 'http://localhost:8080/orders'
--header 'Content-Type: application/json'
--data '{ "id": 35, "status": "first invoice", "items": [ { "id": 1, "description": "Essential", "price": 125.01, "quantity": 15 } ] }'

Update Order - curl --location --request PATCH 'http://localhost:8080/order/{order_id}'
--header 'Content-Type: application/json'
--data '{ "id": 5, "status": "pending invoice", "Item": [ { "id": 125, "description": "laptop", "price": 125.01, "quantity": 15 } ] }'

Get All Orders - GET 'http://localhost:8080/orders'

Get Order By ID - GET 'http://localhost:8080/orderById/{id}'

Get Order By Status - GET 'http://localhost:8080/orderByStatus/{status}'

Sort Orders - GET 'http://localhost:8080/orders?sortBy=id.desc'
GET 'http://localhost:8080/orders?sortBy=id.asc'
GET 'http://localhost:8080/orders?sortBy=status.desc'
GET 'http://localhost:8080/orders?sortBy=status.asc'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages