feat: refs #7905 Added new method getBuysCsv
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-08-29 12:22:29 +02:00
parent 72b4607d54
commit e50c67c305
2 changed files with 4 additions and 4 deletions

View File

@ -1,2 +1,2 @@
INSERT INTO salix.ACL (model,property,principalId)
INSERT IGNORE INTO salix.ACL (model,property,principalId)
VALUES ('Entry','getBuysCsv','supplier');

View File

@ -2,8 +2,8 @@ const UserError = require('vn-loopback/util/user-error');
const {toCSV} = require('vn-loopback/util/csv');
module.exports = Self => {
Self.remoteMethodCtx('getBuys', {
description: 'Returns buys for one entry',
Self.remoteMethodCtx('getBuysCsv', {
description: 'Returns buys for one entry in CSV file format',
accessType: 'READ',
accepts: [{
arg: 'id',
@ -34,7 +34,7 @@ module.exports = Self => {
}
});
Self.getBuys = async(ctx, id, options) => {
Self.getBuysCsv = async(ctx, id, options) => {
const userId = ctx.req.accessToken.userId;
const models = Self.app.models;
const myOptions = {};