5509-entryDmsBack #2079

Merged
alexm merged 21 commits from 5509-entryDmsBack into dev 2024-02-26 10:16:41 +00:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 9f8e448562 - Show all commits

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',
alexm marked this conversation as resolved Outdated

Hablamos de claim o entry?

Hablamos de claim o entry?
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)
alexm marked this conversation as resolved Outdated

Mmm creo que la condición debería duplicarse ya que líneas más arriba usas dmsFk
O si asumimos que la línea 36 SIEMPRE devuelve resultado para que poner ||?

Mmm creo que la condición debería duplicarse ya que líneas más arriba usas dmsFk O si asumimos que la línea 36 SIEMPRE devuelve resultado para que poner ||?
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',
alexm marked this conversation as resolved Outdated

Claim o entry?

Claim o entry?
http: {source: 'path'} http: {source: 'path'}
}, },
{ {