feature: Prometheus Metrics, Supervisor Dashboard, and Promotion Retry Job

This commit is contained in:
voltsrage
2026-06-27 13:29:04 +08:00
parent e22d33b654
commit 04bdb7e85c
31 changed files with 4482 additions and 259 deletions
+6 -2
View File
@@ -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
}
+3 -1
View File
@@ -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 {