Files
assetflow/src/routes/frontend/manage/storageManager.ts
2023-05-16 22:58:08 +02:00

21 lines
602 B
TypeScript

import express, { Request, Response } from 'express';
import { prisma, __path } from '../../../index.js';
function get(req: Request, res: Response) {
prisma.storageUnit.findMany({ include: { contactInfo: true } }).then((storUnits) => {
prisma.storageLocation
.findMany({
include: {
storageUnit: true
}
})
.then((storLocs) => {
prisma.contactInfo.findMany().then((contactInfos) => {
res.render(__path + '/src/frontend/manage/storageManager.eta.html', { storUnits: storUnits, storLocs: storLocs, address: contactInfos });
});
});
});
}
export default { get };