OrderStore
This commit is contained in:
@@ -13,6 +13,15 @@ import { SeatGroup } from "../models/locations/seatGroup.model";
|
||||
|
||||
export const order = Router()
|
||||
|
||||
// Get all orders
|
||||
order.get("/", (req: Request, res: Response) => {
|
||||
Order.findAll()
|
||||
.then(orders => {
|
||||
res.status(200).json(orders)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
// Get all orders of one account by it's user id
|
||||
order.get("/:id", (req: Request, res: Response) => {
|
||||
Order.findAll({
|
||||
|
||||
@@ -272,7 +272,7 @@ export async function prepopulateDatabase() {
|
||||
date: concert.date,
|
||||
name: concertGroup.name,
|
||||
price: concert.price,
|
||||
image: concertGroup.image,
|
||||
image: "http://localhost:3000/static/" + concertGroup.image,
|
||||
inStock: concert.inStock,
|
||||
offered: true,
|
||||
bandId: dataset.dataValues.id,
|
||||
|
||||
Reference in New Issue
Block a user