Skip to content

Commit 970aeaf

Browse files
committed
feat: 重复创建工单保护
1 parent c9c08da commit 970aeaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

next/api/src/router/ticket.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ const ticketDuplicateCheckMiddleware: Middleware = async (ctx: Context, next) =>
471471

472472
// ---- After ticket creation ----
473473
const createdTicketId = (ctx.body as any)?.id;
474-
const wasSuccessful = ctx.status === 201 && createdTicketId;
474+
const wasSuccessful = ctx.status === 200 && createdTicketId;
475475

476476
// Store in Redis only if:
477477
// 1. Ticket creation was successful

0 commit comments

Comments
 (0)