|
@ -103,11 +103,11 @@ module.exports = function (app, router, opts) { |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
findOne && findOne.resourceConsumptions.map(s => { |
|
|
findOne && findOne.resourceConsumptions.map(s => { |
|
|
if (!tokens && s.token) { |
|
|
if (token.find(x => x == s.token)) { |
|
|
tokens = s.token |
|
|
tokens = s.token |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
if (tokens && (tokens == token || tokens == token[1] || tokens == token[0])) { |
|
|
if (tokens && (tokens == token || tokens == token[1] || tokens == token[0])) { |
|
|
if (findOne.enabled) { |
|
|
if (findOne.enabled) { |
|
|
const pool = new Pool({ |
|
|
const pool = new Pool({ |
|
|
user: ctx.fs.dc.orm.config.username, |
|
|
user: ctx.fs.dc.orm.config.username, |
|
@ -177,7 +177,7 @@ module.exports = function (app, router, opts) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async function release (apps, opts) { |
|
|
async function release(apps, opts) { |
|
|
|
|
|
|
|
|
const models = apps.fs.dc.models; |
|
|
const models = apps.fs.dc.models; |
|
|
|
|
|
|
|
@ -199,11 +199,12 @@ module.exports = function (app, router, opts) { |
|
|
order: [["id", "desc"]], |
|
|
order: [["id", "desc"]], |
|
|
include: [{ |
|
|
include: [{ |
|
|
model: models.ResourceConsumption, |
|
|
model: models.ResourceConsumption, |
|
|
|
|
|
|
|
|
}], |
|
|
}], |
|
|
distinct: true |
|
|
distinct: true |
|
|
}); |
|
|
}); |
|
|
findOne && findOne.resourceConsumptions.map(s => { |
|
|
findOne && findOne.resourceConsumptions.map(s => { |
|
|
if (!tokens && s.token) { |
|
|
if (token.find(x => x == s.token)) { |
|
|
tokens = s.token |
|
|
tokens = s.token |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|