fix: send status in request body instead of query params
This commit is contained in:
@@ -15,9 +15,7 @@ const reportService = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
updateStatus(reportId: number, status: string) {
|
updateStatus(reportId: number, status: string) {
|
||||||
return apiClient.put<ApiResponse<WorkReport>>(`/reports/${reportId}/status`, null, {
|
return apiClient.put<ApiResponse<WorkReport>>(`/reports/${reportId}/status`, { status });
|
||||||
params: { status },
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
review(reportId: number, status: 'APPROVED' | 'REJECTED', reviewComment: string) {
|
review(reportId: number, status: 'APPROVED' | 'REJECTED', reviewComment: string) {
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ const ticketService = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
updateStatus(ticketId: number, status: string, assigneeId?: number) {
|
updateStatus(ticketId: number, status: string, assigneeId?: number) {
|
||||||
return apiClient.put<ApiResponse<IssueTicket>>(`/tickets/${ticketId}/status`, null, {
|
const body: Record<string, string> = { status };
|
||||||
params: { status, assigneeId },
|
if (assigneeId) body.assigneeId = String(assigneeId);
|
||||||
});
|
return apiClient.put<ApiResponse<IssueTicket>>(`/tickets/${ticketId}/status`, body);
|
||||||
},
|
},
|
||||||
|
|
||||||
resolveTicket(ticketId: number, resolutionNote: string) {
|
resolveTicket(ticketId: number, resolutionNote: string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user