fix: 修复系统一致性与安全问题
This commit is contained in:
1 parent
aaeec14733
commit
f158f906d5
19 files changed
+194
-34
No files matched your search
@@ -1,4 +1,11 @@
|
||||
import { BadRequestException, Controller, Get, Param, Query } from "@nestjs/common";
|
||||
import {
|
||||
BadRequestException,
|
||||
Controller,
|
||||
Get,
|
||||
NotFoundException,
|
||||
Param,
|
||||
Query,
|
||||
} from "@nestjs/common";
|
||||
import { PublicBrandContextService } from "./public-brand-context.service.js";
|
||||
import { BrandReleaseService } from "../../brand-release.service.js";
|
||||
|
||||
@@ -34,7 +41,7 @@ export class PublicOfferingController {
|
||||
const item = (snapshot?.offerings ?? [])
|
||||
.map((raw) => this.object(raw))
|
||||
.find((offering) => offering.id === id && offering.isEnabled === true);
|
||||
if (!item) throw new BadRequestException("业务提供项不存在");
|
||||
if (!item) throw new NotFoundException("业务提供项不存在");
|
||||
const forms = (snapshot?.forms ?? []).filter((raw) => {
|
||||
const form = this.object(raw);
|
||||
return form.offeringId === id && form.isEnabled === true;
|
||||
|
||||
Reference in new issue
Block a user