Returning StorageLocations in storageUnit api.
This commit is contained in:
parent
533bc1744d
commit
90fc8068a0
@ -15,9 +15,10 @@ function get(req: Request, res: Response) {
|
||||
where: {
|
||||
id: parseInt(req.query.id.toString())
|
||||
},
|
||||
// Get category name from relation.
|
||||
// Get contactInfo and StorageLocation from relation.
|
||||
include: {
|
||||
contactInfo: true
|
||||
contactInfo: true,
|
||||
StorageLocation: true
|
||||
}
|
||||
})
|
||||
.then((items) => {
|
||||
@ -34,9 +35,10 @@ function get(req: Request, res: Response) {
|
||||
} else {
|
||||
prisma.storageUnit
|
||||
.findMany({
|
||||
// Get category name from relation.
|
||||
// Get contactInfo and StorageLocation from relation.
|
||||
include: {
|
||||
contactInfo: true
|
||||
contactInfo: true,
|
||||
StorageLocation: true
|
||||
}
|
||||
})
|
||||
.then((items) => {
|
||||
|
Loading…
Reference in New Issue
Block a user