Demo steps
This commit is contained in:
parent
884662e409
commit
c186c3b515
1 changed files with 14 additions and 0 deletions
|
@ -47,18 +47,32 @@ public class Database {
|
|||
}
|
||||
|
||||
public String getRecipes(Request req, Response res) {
|
||||
// Essentially serialize DefaultRecipes to json
|
||||
return "{}";
|
||||
}
|
||||
|
||||
public String getPallets(Request req, Response res) {
|
||||
// 1. Get query param -> validate cookie type if not null
|
||||
// 2. Figure out if we should return all pallets or just one type
|
||||
// 3. Return pallets as {cookie, blocked}
|
||||
return "{\"pallets\":[]}";
|
||||
}
|
||||
|
||||
public String reset(Request req, Response res) {
|
||||
// 1. Wipe database
|
||||
// 2. Re-run migrations
|
||||
// 3. Return success
|
||||
return "{}";
|
||||
}
|
||||
|
||||
public String createPallet(Request req, Response res) {
|
||||
// 1. Get query param
|
||||
// 2. Check if cookie exists (is in DefaultRecipes)
|
||||
// 3. Start transaction
|
||||
// 3. Check with db if raw materials are available -> decrement if so
|
||||
// 4. Insert into pallets
|
||||
// 5. Commit transaction
|
||||
// 6. Return pallet id
|
||||
return "{}";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue