取消权限验证
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() @ApiBearerAuth()
async areas(@Query() query_data: AreaDto, @Req() req: any) { async areas(@Query() query_data: AreaDto, @Req() req: any) {
// console.log("req", req.headers) // console.log("req", req.headers)
if (!req.headers.authorization) { // if (!req.headers.authorization) {
throw new BadRequestException("无权限") // throw new BadRequestException("无权限")
} // }
try { // try {
// console.log(`${process.env.RUST_URI}/api/viewer`) // // console.log(`${process.env.RUST_URI}/api/viewer`)
const result = await axios.get(`${process.env.RUST_URI}/api/viewer`, { // const result = await axios.get(`${process.env.RUST_URI}/api/viewer`, {
headers: { // headers: {
authorization: req.headers.authorization // authorization: req.headers.authorization
} // }
}) // })
// console.log("result", result) // // console.log("result", result)
} catch (e) { // } catch (e) {
// console.log(e) // // console.log(e)
throw new BadRequestException("无权限, 请联系管理员") // throw new BadRequestException("无权限, 请联系管理员")
} // }
const where: any = {}; const where: any = {};
const query = this.areaRepository.createQueryBuilder('area'); const query = this.areaRepository.createQueryBuilder('area');
query.where(where); query.where(where);

Loading…
Cancel
Save