From 9afeae7047012cdfd6f560f9b0d72574f3efadf1 Mon Sep 17 00:00:00 2001 From: undefined Date: Sun, 13 Mar 2022 18:08:48 +0800 Subject: [PATCH] core: url generation bug fix --- package.json | 4 ++++ packages/hydrooj/package.json | 2 +- packages/hydrooj/src/handler/user.ts | 4 ++-- packages/ui-default/package.json | 6 ------ 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 0f2b1a2a..174aa9bc 100644 --- a/package.json +++ b/package.json @@ -36,9 +36,13 @@ "cross-spawn": "^7.0.3", "esbuild": "0.14.3", "eslint": "^8.11.0", + "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-typescript": "16.1.1", "eslint-import-resolver-typescript": "2.5.0", + "eslint-import-resolver-webpack": "^0.13.2", "eslint-plugin-import": "2.25.4", + "eslint-plugin-jsx-a11y": "^6.5.1", + "eslint-plugin-react": "^7.29.3", "eslint-plugin-simple-import-sort": "7.0.0", "fs-extra": "^10.0.1", "globby": "11.1.0", diff --git a/packages/hydrooj/package.json b/packages/hydrooj/package.json index 95d59e00..2af76d60 100644 --- a/packages/hydrooj/package.json +++ b/packages/hydrooj/package.json @@ -1,6 +1,6 @@ { "name": "hydrooj", - "version": "3.9.1", + "version": "3.9.2", "bin": "bin/hydrooj.js", "main": "src/loader", "module": "src/loader", diff --git a/packages/hydrooj/src/handler/user.ts b/packages/hydrooj/src/handler/user.ts index 30a25479..7a74297a 100644 --- a/packages/hydrooj/src/handler/user.ts +++ b/packages/hydrooj/src/handler/user.ts @@ -171,7 +171,7 @@ export class UserRegisterHandler extends Handler { { mail, redirect: this.domain.registerRedirect }, ); const prefix = this.domain.host - ? `${this.domain.host instanceof Array ? this.domain.host[0] : this.domain.host}/` + ? `${this.domain.host instanceof Array ? this.domain.host[0] : this.domain.host}` : system.get('server.url'); if (system.get('smtp.verify') && system.get('smtp.user')) { const m = await this.renderHTML('user_register_mail.html', { @@ -254,7 +254,7 @@ class UserLostPassHandler extends Handler { const m = await this.renderHTML('user_lostpass_mail.html', { url: `lostpass/${tid}`, url_prefix: this.domain.host - ? `${this.domain.host instanceof Array ? this.domain.host[0] : this.domain.host}/` + ? `${this.domain.host instanceof Array ? this.domain.host[0] : this.domain.host}` : system.get('server.url'), uname: udoc.uname, }); diff --git a/packages/ui-default/package.json b/packages/ui-default/package.json index 18699299..4dc0c1b0 100644 --- a/packages/ui-default/package.json +++ b/packages/ui-default/package.json @@ -41,12 +41,6 @@ "emojis-keywords": "2.0.0", "emojis-list": "2.1.0", "esbuild-loader": "^2.18.0", - "eslint": "^8.11.0", - "eslint-config-airbnb": "^19.0.4", - "eslint-import-resolver-webpack": "^0.13.2", - "eslint-plugin-import": "^2.25.4", - "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-react": "^7.29.3", "fancy-log": "^2.0.0", "file-loader": "^6.2.0", "friendly-errors-webpack-plugin": "^1.7.0",