refs #5509 fix(EntryDms): some issues
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Alex Moreno 2024-02-26 07:22:51 +01:00
parent d37802fda8
commit 9f8e448562
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ const UserError = require('vn-loopback/util/user-error');
module.exports = Self => { module.exports = Self => {
Self.remoteMethodCtx('removeFile', { Self.remoteMethodCtx('removeFile', {
description: 'Removes a claim document', description: 'Removes a entry document',
accessType: 'WRITE', accessType: 'WRITE',
accepts: { accepts: {
arg: 'id', arg: 'id',
@ -36,7 +36,7 @@ module.exports = Self => {
const targetEntryDms = await Self.findById(id, null, myOptions); const targetEntryDms = await Self.findById(id, null, myOptions);
const targetDms = await Self.app.models.Dms.removeFile(ctx, targetEntryDms.dmsFk, myOptions); const targetDms = await Self.app.models.Dms.removeFile(ctx, targetEntryDms.dmsFk, myOptions);
if (!targetDms || ! targetEntryDms) if (!targetDms)
throw new UserError('Try again'); throw new UserError('Try again');
const entryDmsDestroyed = await targetEntryDms.destroy(myOptions); const entryDmsDestroyed = await targetEntryDms.destroy(myOptions);

View File

@ -6,7 +6,7 @@ module.exports = Self => {
accepts: [{ accepts: [{
arg: 'id', arg: 'id',
type: 'number', type: 'number',
description: 'The claim id', description: 'The entry id',
http: {source: 'path'} http: {source: 'path'}
}, },
{ {