feat : update
This commit is contained in:
@@ -17,7 +17,7 @@ export async function PATCH(request: Request, context: RouteContext<"/api/commis
|
||||
.set({ status: parsed.data.status, updatedAt: new Date() })
|
||||
.where(eq(commissionTickets.id, id)).returning({ userId: commissionTickets.userId });
|
||||
if (!ticket) throw new HttpError(404, "ticket-not-found");
|
||||
await notifyCommission(id, ticket.userId);
|
||||
await notifyCommission(id, ticket.userId, `status:${parsed.data.status}`);
|
||||
return Response.json({ status: parsed.data.status });
|
||||
} catch (cause) { return errorResponse(cause); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user