6956-2410_devTest #2112
|
@ -2,7 +2,7 @@ const UserError = require('vn-loopback/util/user-error');
|
|||
|
||||
module.exports = Self => {
|
||||
Self.remoteMethodCtx('removeFile', {
|
||||
description: 'Removes a claim document',
|
||||
description: 'Removes a entry document',
|
||||
accessType: 'WRITE',
|
||||
accepts: {
|
||||
arg: 'id',
|
||||
|
@ -36,7 +36,7 @@ module.exports = Self => {
|
|||
const targetEntryDms = await Self.findById(id, null, myOptions);
|
||||
const targetDms = await Self.app.models.Dms.removeFile(ctx, targetEntryDms.dmsFk, myOptions);
|
||||
|
||||
if (!targetDms || ! targetEntryDms)
|
||||
if (!targetDms)
|
||||
throw new UserError('Try again');
|
||||
|
||||
const entryDmsDestroyed = await targetEntryDms.destroy(myOptions);
|
||||
|
|
|
@ -6,7 +6,7 @@ module.exports = Self => {
|
|||
accepts: [{
|
||||
arg: 'id',
|
||||
type: 'number',
|
||||
description: 'The claim id',
|
||||
description: 'The entry id',
|
||||
http: {source: 'path'}
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue