forked from s442333/DINO_SCRUM
1.2 KiB
1.2 KiB
DINO_SCRUM
DINO_SCRUM
EndPoints
POST /api/product/change-quantity
{
"id": Int,
"change": Int
}
Return:
{
"id": Int,
"name": String,
"price": Float,
"quantity": Int,
"imageLink": String
}
This endpoint return editet product.
GET /api/get-all
Return:
{
[
{
"id": Int,
"name": String,
"price": Float,
"quantity": Int,
"imageLink": String
},
{...}
]
}
GET /api/get-price-of-all
Return:
{
"price-of-all": Float
}
POST /api/product/add
{
"name": String,
"price": Float,
"quantity": Int,
"imageLing": String
}
Return:
{
"id": Int,
"name": String,
"price": Float,
"quantity": Int,
"imageLink": String
}
This endpoint return a newly created product.
DELETE /api/delete-product
{
"id": Int
}
This endpoint doesn't return any data.
GET /api/product/get-by-id
Return:
{
"id": Int,
"name": String,
"price": Float,
"quantity": Int,
"imageLink": String
}