Creating admin pages, new brand API endpoint

This commit is contained in:
2024-09-25 15:42:05 +02:00
parent cbd01f6d59
commit f41cf1ba90
28 changed files with 417 additions and 76 deletions

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)
})
})