Browse Source

(*) 资源消费 我的申请功能完善

master
peng.peng 1 year ago
parent
commit
cc97a8b382
  1. 9
      api/app/lib/routes/latestMetadata/index.js

9
api/app/lib/routes/latestMetadata/index.js

@ -103,11 +103,11 @@ module.exports = function (app, router, opts) {
});
findOne && findOne.resourceConsumptions.map(s => {
if (!tokens && s.token) {
if (token.find(x => x == 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) {
const pool = new Pool({
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;
@ -199,11 +199,12 @@ module.exports = function (app, router, opts) {
order: [["id", "desc"]],
include: [{
model: models.ResourceConsumption,
}],
distinct: true
});
findOne && findOne.resourceConsumptions.map(s => {
if (!tokens && s.token) {
if (token.find(x => x == s.token)) {
tokens = s.token
}
})

Loading…
Cancel
Save