removed redundant getAll attribute
This commit is contained in:
parent
db6df2fdc6
commit
94186a3a18
@ -14,12 +14,7 @@ async function get(req: Request, res: Response) {
|
||||
req.query.search = '';
|
||||
}
|
||||
|
||||
if (req.query.getAll === undefined) {
|
||||
// Check if required fields are present.
|
||||
if (!req.query.id) {
|
||||
res.status(400).json({ status: 'ERROR', errorcode: 'VALIDATION_ERROR', message: 'One or more required fields are missing' });
|
||||
return;
|
||||
}
|
||||
if (req.query.id) {
|
||||
prisma.storageLocation
|
||||
.findUnique({
|
||||
where: {
|
||||
|
@ -14,12 +14,7 @@ async function get(req: Request, res: Response) {
|
||||
if (req.query.search === undefined) {
|
||||
req.query.search = '';
|
||||
}
|
||||
if (req.query.getAll === undefined) {
|
||||
// Check if required fields are present.
|
||||
if (!req.query.id) {
|
||||
res.status(400).json({ status: 'ERROR', errorcode: 'VALIDATION_ERROR', message: 'One or more required fields are missing' });
|
||||
return;
|
||||
}
|
||||
if (req.query.id) {
|
||||
prisma.storageUnit
|
||||
.findUnique({
|
||||
where: {
|
||||
|
@ -138,8 +138,8 @@ const itemList = $('#itemList');
|
||||
const itemListUnit = $('#itemListUnit');
|
||||
|
||||
// itemList.empty();
|
||||
itemListUnit.bootstrapTable({ url: '/api/v1/storageUnits?getAll=true', search: true, showRefresh: true, responseHandler: dataResponseHandlerUnit, sidePagination: 'server', serverSort: true, silentSort: false });
|
||||
itemList.bootstrapTable({ url: '/api/v1/storageLocations?getAll=true', search: true, showRefresh: true, responseHandler: dataResponseHandler, sidePagination: 'server', serverSort: true, silentSort: false });
|
||||
itemListUnit.bootstrapTable({ url: '/api/v1/storageUnits', search: true, showRefresh: true, responseHandler: dataResponseHandlerUnit, sidePagination: 'server', serverSort: true, silentSort: false });
|
||||
itemList.bootstrapTable({ url: '/api/v1/storageLocations', search: true, showRefresh: true, responseHandler: dataResponseHandler, sidePagination: 'server', serverSort: true, silentSort: false });
|
||||
setTimeout(() => {
|
||||
activateTooltips();
|
||||
}, 1000);
|
||||
|
Loading…
Reference in New Issue
Block a user