Commit 3f81a889 authored by nanahira's avatar nanahira

typo

parent 330faac5
...@@ -41,7 +41,7 @@ export class S3Service extends ConsoleLogger { ...@@ -41,7 +41,7 @@ export class S3Service extends ConsoleLogger {
public readonly cdnUrl = public readonly cdnUrl =
this.getConfig('S3_CDN_URL') || `${this.getConfig('S3_ENDPOINT')}/${this.bucket}${this.prefix ? `/${this.prefix}` : ''}`; this.getConfig('S3_CDN_URL') || `${this.getConfig('S3_ENDPOINT')}/${this.bucket}${this.prefix ? `/${this.prefix}` : ''}`;
public readonly cdnUrlOversize = this.getConfig('S3_CDN_URL_OVERSIZE') || this.cdnUrl; public readonly cdnUrlOversize = this.getConfig('S3_CDN_URL_OVERSIZE') || this.cdnUrl;
public readonly cdNUrlCn = this.getConfig('S3_CDN_URL_CN') || this.cdnUrl; public readonly cdnUrlCn = this.getConfig('S3_CDN_URL_CN') || this.cdnUrl;
private readonly s3Config: S3ClientConfig = { private readonly s3Config: S3ClientConfig = {
credentials: { credentials: {
accessKeyId: this.getConfig('S3_KEY'), accessKeyId: this.getConfig('S3_KEY'),
......
...@@ -18,7 +18,7 @@ import { ChnrouteService } from '../chnroute/chnroute.service'; ...@@ -18,7 +18,7 @@ import { ChnrouteService } from '../chnroute/chnroute.service';
export class UpdateService extends ConsoleLogger { export class UpdateService extends ConsoleLogger {
private readonly cdnUrl = this.packageS3.cdnUrl; private readonly cdnUrl = this.packageS3.cdnUrl;
private readonly cdnUrlOversize = this.packageS3.cdnUrlOversize; private readonly cdnUrlOversize = this.packageS3.cdnUrlOversize;
private readonly cdNUrlCn = this.packageS3.cdNUrlCn; private readonly cdnUrlCn = this.packageS3.cdnUrlCn;
constructor( constructor(
@InjectConnection('app') @InjectConnection('app')
private db: Connection, private db: Connection,
...@@ -146,7 +146,7 @@ export class UpdateService extends ConsoleLogger { ...@@ -146,7 +146,7 @@ export class UpdateService extends ConsoleLogger {
private async prepareUrl(archives: Archive[], ip: string) { private async prepareUrl(archives: Archive[], ip: string) {
await this.mirror.lookForArchivesMirror(archives, ip); await this.mirror.lookForArchivesMirror(archives, ip);
const isChina = this.chnroute.isChina(ip); const isChina = this.chnroute.isChina(ip);
archives.forEach((a) => a.fillUrl(isChina ? this.cdNUrlCn : this.cdnUrl, this.cdnUrlOversize, false)); archives.forEach((a) => a.fillUrl(isChina ? this.cdnUrlCn : this.cdnUrl, this.cdnUrlOversize, false));
return archives; return archives;
} }
......
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