Commit 27c00edd authored by nanahira's avatar nanahira

fix

parent 61a4799c
Pipeline #5119 passed with stage
in 3 minutes and 33 seconds
...@@ -12,6 +12,7 @@ import { ArchiveFile } from '../entities/ArchiveFile.entity'; ...@@ -12,6 +12,7 @@ import { ArchiveFile } from '../entities/ArchiveFile.entity';
import * as os from 'os'; import * as os from 'os';
import moment from 'moment'; import moment from 'moment';
import { AppsJson } from '../utility/apps-json-type'; import { AppsJson } from '../utility/apps-json-type';
import Platform = AppsJson.Platform;
@Injectable() @Injectable()
export class UpdateService extends ConsoleLogger { export class UpdateService extends ConsoleLogger {
...@@ -54,7 +55,13 @@ export class UpdateService extends ConsoleLogger { ...@@ -54,7 +55,13 @@ export class UpdateService extends ConsoleLogger {
.select(['build.version', 'build.id', 'depot.platform']) .select(['build.version', 'build.id', 'depot.platform'])
.innerJoin('build.depot', 'depot') .innerJoin('build.depot', 'depot')
.where('depot.appId = :appId', { appId: app.id }) .where('depot.appId = :appId', { appId: app.id })
.andWhere(new Brackets((qb) => qb.where('depot.platform = "generic"').orWhere('depot.platform = :platform', { platform }))) .andWhere(
new Brackets((qb) =>
qb
.where('depot.platform = :genericPlatform', { genericPlatform: Platform.generic })
.orWhere('depot.platform = :platform', { platform })
)
)
.orderBy('build.id', 'DESC') .orderBy('build.id', 'DESC')
.take(1) .take(1)
.getOne(); .getOne();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment