Creating admin pages, new brand API endpoint

This commit is contained in:
tobias committed 2024-09-25 15:42:05 +02:00
1 parent cbd01f6d59
commit f41cf1ba90
28 files changed
+417 -76

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
import { Brand } from "../models/brand.model"
import { Request, Router, Response } from "express"
export const brand = Router()
// Get all brands
brand.get("/", (req: Request, res: Response) => {
Brand.findAll()
.then(brands => {
res.status(200).json(brands)
})
})