feature: Prometheus Metrics, Supervisor Dashboard, and Promotion Retry Job
This commit is contained in:
@@ -131,8 +131,12 @@ export async function get<T>(url: string, params?: Record<string, unknown>): Pro
|
||||
return response.data
|
||||
}
|
||||
|
||||
export async function post<T>(url: string, data?: unknown): Promise<ApiResponse<T>> {
|
||||
const response = await apiClient.post<ApiResponse<T>>(url, data)
|
||||
export async function post<T>(
|
||||
url: string,
|
||||
data?: unknown,
|
||||
headers?: Record<string, string>
|
||||
): Promise<ApiResponse<T>> {
|
||||
const response = await apiClient.post<ApiResponse<T>>(url, data, { headers })
|
||||
return response.data
|
||||
}
|
||||
|
||||
|
||||
@@ -183,7 +183,9 @@ async function assignBatch(batchId: string, entryClerkUserId: string): Promise<v
|
||||
}
|
||||
|
||||
async function approveBatch(batchId: string): Promise<void> {
|
||||
await post<void>(`digitization-batches/${batchId}/approve`, null)
|
||||
await post<void>(`digitization-batches/${batchId}/approve`, null, {
|
||||
'Idempotency-Key': crypto.randomUUID(),
|
||||
})
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user