Add ToursTable, update API documentation
This commit is contained in:
@@ -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)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user