260314:1714 20260314:1700 Refactor Migration #2
Build and Deploy / deploy (push) Successful in 4m18s

This commit is contained in:
admin
2026-03-14 17:14:47 +07:00
parent 0211f01aa8
commit b93cd91325
6 changed files with 198 additions and 3 deletions
@@ -4,6 +4,7 @@ import {
MigrationErrorItem,
PaginatedResponse,
MigrationReviewStatus,
CommitBatchDto,
} from '@/types/migration';
export const migrationService = {
@@ -43,6 +44,15 @@ export const migrationService = {
return data?.data || data;
},
commitBatch: async (payload: CommitBatchDto, idempotencyKey: string) => {
const { data } = await api.post(`/migration/commit_batch`, payload, {
headers: {
'idempotency-key': idempotencyKey,
},
});
return data?.data || data;
},
getStagingFileUrl: (filePath: string) => {
// Generate the URL directly since it returns a file stream.
// Ensure we encode the file path correctly.