diff --git a/src/app.controller.ts b/src/app.controller.ts index dc6aea8..2c11b13 100644 --- a/src/app.controller.ts +++ b/src/app.controller.ts @@ -654,21 +654,21 @@ export class AppController { @ApiBearerAuth() async areas(@Query() query_data: AreaDto, @Req() req: any) { // console.log("req", req.headers) - if (!req.headers.authorization) { - throw new BadRequestException("无权限") - } - try { - // console.log(`${process.env.RUST_URI}/api/viewer`) - const result = await axios.get(`${process.env.RUST_URI}/api/viewer`, { - headers: { - authorization: req.headers.authorization - } - }) - // console.log("result", result) - } catch (e) { - // console.log(e) - throw new BadRequestException("无权限, 请联系管理员") - } + // if (!req.headers.authorization) { + // throw new BadRequestException("无权限") + // } + // try { + // // console.log(`${process.env.RUST_URI}/api/viewer`) + // const result = await axios.get(`${process.env.RUST_URI}/api/viewer`, { + // headers: { + // authorization: req.headers.authorization + // } + // }) + // // console.log("result", result) + // } catch (e) { + // // console.log(e) + // throw new BadRequestException("无权限, 请联系管理员") + // } const where: any = {}; const query = this.areaRepository.createQueryBuilder('area'); query.where(where);