Returning StorageLocations in storageUnit api.

This commit is contained in:
spacelord committed 2023-05-16 21:15:17 +02:00
1 parent 533bc1744d
commit 90fc8068a0
1 file changed
+6 -4
+6 -4
View File
@@ -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) => {