取消权限验证
continuous-integration/drone/push Build is passing Details

main
rustdreamer 2 years ago
parent 5d1c242461
commit b97b973e75

@ -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);

Loading…
Cancel
Save