Add ToursTable, update API documentation

This commit is contained in:
2024-09-26 14:40:41 +02:00
parent 787c5a61e5
commit f5204578e4
46 changed files with 776 additions and 829 deletions

View File

@@ -1,10 +1,16 @@
import { Location } from "../models/location.model";
import { City } from "../models/acts/city.model";
import { Location } from "../models/acts/location.model";
import { Request, Response, Router } from "express";
export const location = Router()
location.get("/", (req: Request, res: Response) => {
Location.findAll()
Location.findAll({
include: [ City ],
attributes: {
exclude: [ "cityId" ]
}
})
.then(locations => {
res.status(200).json(locations)
})