13 lines
592 B
JavaScript
13 lines
592 B
JavaScript
import { moveRecordUp, moveRecordUpToTop } from '../../database/moveRecord.js';
|
|
import { getIntermentContainerTypes } from '../../helpers/functions.cache.js';
|
|
export default function handler(request, response) {
|
|
const success = request.body.moveToEnd === '1'
|
|
? moveRecordUpToTop('IntermentContainerTypes', request.body.intermentContainerTypeId)
|
|
: moveRecordUp('IntermentContainerTypes', request.body.intermentContainerTypeId);
|
|
const intermentContainerTypes = getIntermentContainerTypes();
|
|
response.json({
|
|
success,
|
|
intermentContainerTypes
|
|
});
|
|
}
|