core: url generation bug fix

pull/318/head
undefined 3 years ago
parent dbbc0c5e1d
commit 9afeae7047

@ -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",

@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "3.9.1",
"version": "3.9.2",
"bin": "bin/hydrooj.js",
"main": "src/loader",
"module": "src/loader",

@ -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,
});

@ -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",

Loading…
Cancel
Save