From b97b973e755e018250d3b91fd48bbaa642fc0eb0 Mon Sep 17 00:00:00 2001 From: rustdreamer Date: Mon, 8 Apr 2024 21:12:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E6=9D=83=E9=99=90=E9=AA=8C?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.controller.ts | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) 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);