Commit ac2b9f65 authored by nanahira's avatar nanahira

fix lint

parent 14175a8f
Pipeline #15211 passed with stages
in 4 minutes and 5 seconds
...@@ -343,9 +343,11 @@ export class AppService extends ConsoleLogger { ...@@ -343,9 +343,11 @@ export class AppService extends ConsoleLogger {
} }
async lookForExistingArchiveHash(path: string) { async lookForExistingArchiveHash(path: string) {
const archives = await this.db.getRepository(Archive).find({ where: { path, hash: Not(IsNull()) }, select: ['hash'], order: { id: 'DESC' } }); const [archive] = await this.db
if (archives.length) { .getRepository(Archive)
return archives[0].hash; .find({ where: { path, hash: Not(IsNull()) }, select: ['hash'], order: { id: 'DESC' }, take: 1 });
if (archive) {
return archive.hash;
} }
return null; return null;
// return this.checkHashFromUrl(`${this.packageS3.cdnUrl}/${path}.tar.zst`); // return this.checkHashFromUrl(`${this.packageS3.cdnUrl}/${path}.tar.zst`);
......
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