diff --git a/src/configs/constants.ts b/src/configs/constants.ts index 2733a49..29ba3b2 100644 --- a/src/configs/constants.ts +++ b/src/configs/constants.ts @@ -2,11 +2,9 @@ const constants = { siteName: 'SDUT OJ', siteTitle: 'SDUT OnlineJudge', accessTokenCookieName: 'access_token_openoj', - // avatarUrlPrefix: 'http://127.0.0.1/tmp4oj/avatars/', - // bannerImageUrlPrefix: 'http://127.0.0.1/tmp4oj/banner_images/', - imageDirPrefix: '/image/', - avatarUrlPrefix: '/image/avatars/', - bannerImageUrlPrefix: '/image/banner_images/', + imageDirPrefix: `${process.env.MEDIA_URL}/image/`, + avatarUrlPrefix: `${process.env.MEDIA_URL}/image/avatars/`, + bannerImageUrlPrefix: `${process.env.MEDIA_URL}/image/banner_images/`, requestTimeout: 60 * 1000, msgDuration: { success: 3, diff --git a/tasks/upload-cdn.js b/tasks/upload-cdn.js index 49d9044..a7f3744 100644 --- a/tasks/upload-cdn.js +++ b/tasks/upload-cdn.js @@ -1,3 +1,5 @@ +/* eslint-disable func-name-matching */ +/* eslint-disable @typescript-eslint/no-require-imports */ // 上传产物到腾讯云 COS const fs = require('fs');