Created
March 13, 2019 18:59
-
-
Save bogdan-nourescu/4ba362dc44e76771f58d313f44022483 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"produse":{ | |
"-L_8raPSK8cONto6q7ra":{ | |
"nume":"", | |
"imagine":"", | |
"pret":123, | |
"descriere":"....", | |
"stoc":59 | |
}, | |
"-asdasd":{ | |
"nume":"", | |
"imagine":"", | |
"pret":123, | |
"descriere":"....", | |
"stoc":59 | |
}, | |
"-qweqweq":{ | |
"nume":"", | |
"imagine":"", | |
"pret":123, | |
"descriere":"....", | |
"stoc":13 | |
} | |
} | |
"cos":{ | |
"-L_8raPSK8cONto6q7ra":{ | |
"nume":"", | |
"imagine":"", | |
"pret":123, | |
"cantitate":5 | |
}, | |
"-qweqweq":{ | |
"nume":"", | |
"imagine":"", | |
"pret":123, | |
"cantitate":2 | |
} | |
} | |
} | |
/* | |
Lista produse: | |
GET /produse | |
Optional: GET /cos (pentru a afisa cate produse sunt in cos) | |
Detalii Produs: | |
GET /produse/idProdus | |
Optional: GET /cos (pentru a afisa cate produse sunt in cos) | |
Adaugare in cos: | |
GET /cos/idProdus/cantitate ==> cantitatea curenta | |
PUT /cos/idProdus/ | |
Lista cos: | |
GET /cos | |
Butonul cumpara: | |
DELETE /cos | |
FOR(var i in cos){ | |
GET /produse/${i}/stoc | |
PUT /produse/${i}/stoc | |
} | |
Admin: | |
GET /produse | |
Admin Adaugare: | |
POST /produse | |
Admin editare: | |
PUT /produse/idProdus | |
Optional: GET /cos/idProdus/ | |
Optional: PUT /cos/idProdus/ | |
Admin stergere: | |
DELETE /produse/idProdus | |
DELETE /cos/idProdus/ | |
*/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment