mirror of
https://github.com/vastxie/99AI.git
synced 2025-11-12 11:43:42 +08:00
v3.5.0
This commit is contained in:
4
dist/app.module.js
vendored
4
dist/app.module.js
vendored
@@ -49,7 +49,11 @@ AppModule = __decorate([
|
||||
imports: [
|
||||
database_module_1.DatabaseModule,
|
||||
serve_static_1.ServeStaticModule.forRoot({
|
||||
rootPath: (0, path_1.join)(__dirname, '..', 'public/admin'),
|
||||
serveRoot: '/admin',
|
||||
}, {
|
||||
rootPath: (0, path_1.join)(__dirname, '..', 'public'),
|
||||
serveRoot: '/',
|
||||
}),
|
||||
user_module_1.UserModule,
|
||||
plugin_module_1.PluginModule,
|
||||
|
||||
2
dist/main.js
vendored
2
dist/main.js
vendored
@@ -12,7 +12,6 @@ const crypto_1 = require("crypto");
|
||||
const Dotenv = require("dotenv");
|
||||
const xmlBodyParser = require("express-xml-bodyparser");
|
||||
const ioredis_1 = require("ioredis");
|
||||
const path_1 = require("path");
|
||||
const app_module_1 = require("./app.module");
|
||||
Dotenv.config({ path: '.env' });
|
||||
async function bootstrap() {
|
||||
@@ -32,7 +31,6 @@ async function bootstrap() {
|
||||
await (0, initDatabase_1.initDatabase)();
|
||||
app.useLogger(app.get(custom_logger_service_1.CustomLoggerService));
|
||||
app.use(compression());
|
||||
const www = (0, path_1.resolve)(__dirname, './public');
|
||||
app.use(xmlBodyParser());
|
||||
app.enableCors();
|
||||
app.setGlobalPrefix('/api');
|
||||
|
||||
7
dist/modules/auth/auth.service.js
vendored
7
dist/modules/auth/auth.service.js
vendored
@@ -296,13 +296,14 @@ let AuthService = class AuthService {
|
||||
const nameSpace = await this.globalConfigService.getNamespace();
|
||||
const { color = '#fff' } = parmas;
|
||||
const captcha = svgCaptcha.create({
|
||||
size: 5,
|
||||
size: 4,
|
||||
ignoreChars: '0o1i',
|
||||
noise: 4,
|
||||
color: true,
|
||||
background: color,
|
||||
height: 33,
|
||||
width: 150,
|
||||
height: 35,
|
||||
width: 120,
|
||||
charPreset: 'abcdefghijklmnopqrstuvwxyz',
|
||||
});
|
||||
const text = captcha.text;
|
||||
const randomId = Math.random().toString(36).substr(2, 9);
|
||||
|
||||
@@ -388,14 +388,14 @@ let GlobalConfigService = class GlobalConfigService {
|
||||
return { siteName, qqNumber, vxNumber, registerBaseUrl, domain };
|
||||
}
|
||||
async getPhoneVerifyConfig() {
|
||||
const { phoneRegisterStatus, aliPhoneAccessKeyId, aliPhoneAccessKeySecret, aliPhoneSignName, aliPhoneTemplateCode, } = await this.getConfigs([
|
||||
'phoneRegisterStatus',
|
||||
const { phoneLoginStatus, aliPhoneAccessKeyId, aliPhoneAccessKeySecret, aliPhoneSignName, aliPhoneTemplateCode, } = await this.getConfigs([
|
||||
'phoneLoginStatus',
|
||||
'aliPhoneAccessKeyId',
|
||||
'aliPhoneAccessKeySecret',
|
||||
'aliPhoneSignName',
|
||||
'aliPhoneTemplateCode',
|
||||
]);
|
||||
if (Number(phoneRegisterStatus) !== 1) {
|
||||
if (Number(phoneLoginStatus) !== 1) {
|
||||
throw new common_1.HttpException('手机验证码功能暂未开放!', common_1.HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user