mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
更新 node 依赖
This commit is contained in:
@@ -3,7 +3,7 @@ import bodyParser from 'body-parser';
|
||||
import cors from 'cors';
|
||||
import routes from '../api';
|
||||
import config from '../config';
|
||||
import jwt, { UnauthorizedError } from 'express-jwt';
|
||||
import { UnauthorizedError, expressjwt } from 'express-jwt';
|
||||
import fs from 'fs/promises';
|
||||
import { getPlatform, getToken, safeJSONParse } from '../config/util';
|
||||
import Container from 'typedi';
|
||||
@@ -29,7 +29,7 @@ export default ({ app }: { app: Application }) => {
|
||||
target: `http://0.0.0.0:${config.publicPort}/api`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: { '/api/public': '' },
|
||||
logProvider: () => Logger,
|
||||
logger: Logger,
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -37,7 +37,7 @@ export default ({ app }: { app: Application }) => {
|
||||
app.use(bodyParser.urlencoded({ limit: '50mb', extended: true }));
|
||||
|
||||
app.use(
|
||||
jwt({
|
||||
expressjwt({
|
||||
secret: config.secret,
|
||||
algorithms: ['HS384'],
|
||||
}).unless({
|
||||
|
||||
@@ -2,7 +2,7 @@ import bodyParser from 'body-parser';
|
||||
import { errors } from 'celebrate';
|
||||
import cors from 'cors';
|
||||
import { Application, NextFunction, Request, Response } from 'express';
|
||||
import jwt from 'express-jwt';
|
||||
import { expressjwt } from 'express-jwt';
|
||||
import Container from 'typedi';
|
||||
import config from '../config';
|
||||
import SystemService from '../services/system';
|
||||
@@ -16,7 +16,7 @@ export default ({ app }: { app: Application }) => {
|
||||
app.use(bodyParser.urlencoded({ limit: '50mb', extended: true }));
|
||||
|
||||
app.use(
|
||||
jwt({
|
||||
expressjwt({
|
||||
secret: config.secret,
|
||||
algorithms: ['HS384'],
|
||||
}),
|
||||
|
||||
@@ -17,7 +17,6 @@ server.bindAsync(
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
server.start();
|
||||
Logger.debug(`✌️ 定时服务启动成功!`);
|
||||
console.debug(`✌️ 定时服务启动成功!`);
|
||||
process.send?.('ready');
|
||||
|
||||
@@ -214,7 +214,7 @@ export default class ScheduleService {
|
||||
const job = new LongIntervalJob(
|
||||
{ runImmediately: false, ...schedule },
|
||||
task,
|
||||
_id,
|
||||
{ id: _id },
|
||||
);
|
||||
|
||||
this.intervalSchedule.addIntervalJob(job);
|
||||
|
||||
Reference in New Issue
Block a user