feat: refs #7905 Added new method getBuysCsv
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
72b4607d54
commit
e50c67c305
|
@ -1,2 +1,2 @@
|
||||||
INSERT INTO salix.ACL (model,property,principalId)
|
INSERT IGNORE INTO salix.ACL (model,property,principalId)
|
||||||
VALUES ('Entry','getBuysCsv','supplier');
|
VALUES ('Entry','getBuysCsv','supplier');
|
||||||
|
|
|
@ -2,8 +2,8 @@ const UserError = require('vn-loopback/util/user-error');
|
||||||
const {toCSV} = require('vn-loopback/util/csv');
|
const {toCSV} = require('vn-loopback/util/csv');
|
||||||
|
|
||||||
module.exports = Self => {
|
module.exports = Self => {
|
||||||
Self.remoteMethodCtx('getBuys', {
|
Self.remoteMethodCtx('getBuysCsv', {
|
||||||
description: 'Returns buys for one entry',
|
description: 'Returns buys for one entry in CSV file format',
|
||||||
accessType: 'READ',
|
accessType: 'READ',
|
||||||
accepts: [{
|
accepts: [{
|
||||||
arg: 'id',
|
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 userId = ctx.req.accessToken.userId;
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
const myOptions = {};
|
const myOptions = {};
|
||||||
|
|
Loading…
Reference in New Issue