fix: harden api authentication and validation

This commit is contained in:
2026-09-18 16:37:48 +08:00
parent ae5f26baab
commit b89853bc94
5 changed files with 75 additions and 28 deletions

10
apps/api/src/admin.dto.ts Normal file
View File

@@ -0,0 +1,10 @@
import { IsIn, IsOptional, IsString } from "class-validator";
export class UpdateBookingStatusDto {
@IsIn(["received", "contacting", "confirmed", "completed", "cancelled"])
status!: "received" | "contacting" | "confirmed" | "completed" | "cancelled";
@IsOptional()
@IsString()
adminNote?: string;
}