Creating admin pages, new brand API endpoint
This commit is contained in:
1 parent
6dd49f630d
commit
0856540441
28 files changed
+417
-76
No files matched your search
@@ -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)
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user