Commit 0a7999ed by chenjinjing

no message

parent bd9bc9c1
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
<dbPort>40002</dbPort> <dbPort>40002</dbPort>
<dbHost>localhost</dbHost> <dbHost>localhost</dbHost>
<sign>xxx90909082fsdahfjosadjfpoiwausjorip2hjklrhn1ioud0u124rx0qwejfokasjfolksaujfoas</sign> <sign>xxx90909082fsdahfjosadjfpoiwausjorip2hjklrhn1ioud0u124rx0qwejfokasjfolksaujfoas</sign>
<fileIP>http://192.168.0.71:40004</fileIP>
</config> </config>
...@@ -45,7 +45,7 @@ export async function authentication(req, res, next) { ...@@ -45,7 +45,7 @@ export async function authentication(req, res, next) {
else { else {
let userInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.党员基础信息表, {pmId:userId}, null); let userInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.党员基础信息表, {pmId:userId}, null);
if (!userInfo || !userInfo.pmId) return next(new BizError(ERRORENUM.身份验证失败)); if (!userInfo || !userInfo.pmId) return next(new BizError(ERRORENUM.身份验证失败));
if (!userInfo.adminToken || userInfo.adminToken != token) return next(new BizError(ERRORENUM.身份验证过期)); if (!userInfo.token || userInfo.token != token) return next(new BizError(ERRORENUM.身份验证过期));
} }
return next(); return next();
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
* 总路由入口 * 总路由入口
*/ */
import * as asyncHandler from 'express-async-handler' import * as asyncHandler from 'express-async-handler'
import { fileUpAuthentication } from '../middleware/user';
import { parseFormParam } from '../middleware/fromParam'; import { parseFormParam } from '../middleware/fromParam';
import { eccEnumValue } from '../util/verificationEnum';
import { DIRNAMEENUM } from '../config/enums/enum';
import { getFilesId } from '../tools/systemTools'; import { getFilesId } from '../tools/systemTools';
const fs = require('fs'); const fs = require('fs');
const path = require('path'); const path = require('path');
...@@ -28,3 +25,5 @@ async function upFiles(req, res) { ...@@ -28,3 +25,5 @@ async function upFiles(req, res) {
res.success({fileName}); res.success({fileName});
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment