From ac986f1db8f3f0b9950173e15b44351d890a5caf Mon Sep 17 00:00:00 2001 From: hqer927 <285569480@qq.com> Date: Wed, 11 Sep 2024 15:21:54 +0800 Subject: [PATCH] update: change request parameter --- src/v1/controller/user/agreement/Set.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/v1/controller/user/agreement/Set.ts b/src/v1/controller/user/agreement/Set.ts index 14e3dbc1..22025601 100644 --- a/src/v1/controller/user/agreement/Set.ts +++ b/src/v1/controller/user/agreement/Set.ts @@ -14,9 +14,9 @@ export class AgreementSet extends AbstractController public static readonly schema: FastifySchema = { body: { type: "object", - required: ["is_agree_collect_data"], + required: ["isAgree"], properties: { - is_agree_collect_data: { + isAgree: { type: "boolean" }, }, @@ -36,7 +36,7 @@ export class AgreementSet extends AbstractController } public async execute(): Promise> { - await this.svc.userAgreement.set(this.body.is_agree_collect_data); + await this.svc.userAgreement.set(this.body.isAgree); return { status: Status.Success, data: { @@ -52,7 +52,7 @@ export class AgreementSet extends AbstractController interface RequestType { body: { - is_agree_collect_data: boolean; + isAgree: boolean; }; }