refs #4975 Args declared into self.upload
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Guillermo Bonet 2023-01-30 14:57:15 +01:00
parent a59807e7fc
commit db282cf74b
1 changed files with 7 additions and 2 deletions

View File

@ -47,8 +47,7 @@ module.exports = Self => {
verb: 'POST'
}
});
// Cambiar a forma corta: ejemplo: ctx.appName
Self.upload = async(ctx, appName, toVersion, branch, fromVersion, description, unlock, options) => {
Self.upload = async(ctx, options) => {
const models = Self.app.models;
const myOptions = {};
const $t = ctx.req.__; // $translate
@ -56,6 +55,12 @@ module.exports = Self => {
const AccessContainer = models.AccessContainer;
const fileOptions = {};
let tx;
const appName = ctx.args.appName;
const toVersion = ctx.args.toVersion;
const branch = ctx.args.branch;
const fromVersion = ctx.args.fromVersion;
let description = ctx.args.description;
const unlock = ctx.args.unlock;
if (typeof options == 'object')
Object.assign(myOptions, options);