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: {
|
where: {
|
||||||
id: parseInt(req.query.id.toString())
|
id: parseInt(req.query.id.toString())
|
||||||
},
|
},
|
||||||
// Get category name from relation.
|
// Get contactInfo and StorageLocation from relation.
|
||||||
include: {
|
include: {
|
||||||
contactInfo: true
|
contactInfo: true,
|
||||||
|
StorageLocation: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then((items) => {
|
.then((items) => {
|
||||||
@ -34,9 +35,10 @@ function get(req: Request, res: Response) {
|
|||||||
} else {
|
} else {
|
||||||
prisma.storageUnit
|
prisma.storageUnit
|
||||||
.findMany({
|
.findMany({
|
||||||
// Get category name from relation.
|
// Get contactInfo and StorageLocation from relation.
|
||||||
include: {
|
include: {
|
||||||
contactInfo: true
|
contactInfo: true,
|
||||||
|
StorageLocation: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then((items) => {
|
.then((items) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user