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 = '';
|
req.query.search = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (req.query.getAll === undefined) {
|
if (req.query.id) {
|
||||||
// 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;
|
|
||||||
}
|
|
||||||
prisma.storageLocation
|
prisma.storageLocation
|
||||||
.findUnique({
|
.findUnique({
|
||||||
where: {
|
where: {
|
||||||
|
@ -14,12 +14,7 @@ async function get(req: Request, res: Response) {
|
|||||||
if (req.query.search === undefined) {
|
if (req.query.search === undefined) {
|
||||||
req.query.search = '';
|
req.query.search = '';
|
||||||
}
|
}
|
||||||
if (req.query.getAll === undefined) {
|
if (req.query.id) {
|
||||||
// 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;
|
|
||||||
}
|
|
||||||
prisma.storageUnit
|
prisma.storageUnit
|
||||||
.findUnique({
|
.findUnique({
|
||||||
where: {
|
where: {
|
||||||
|
@ -138,8 +138,8 @@ const itemList = $('#itemList');
|
|||||||
const itemListUnit = $('#itemListUnit');
|
const itemListUnit = $('#itemListUnit');
|
||||||
|
|
||||||
// itemList.empty();
|
// itemList.empty();
|
||||||
itemListUnit.bootstrapTable({ url: '/api/v1/storageUnits?getAll=true', search: true, showRefresh: true, responseHandler: dataResponseHandlerUnit, 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?getAll=true', search: true, showRefresh: true, responseHandler: dataResponseHandler, 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(() => {
|
setTimeout(() => {
|
||||||
activateTooltips();
|
activateTooltips();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
Loading…
Reference in New Issue
Block a user