스케줄 페이지 작업 완료 .
This commit is contained in:
1 parent
29e0c7d79c
commit
4d91da9b9a
13 files changed
+1301
-49
No files matched your search
@@ -877,3 +877,42 @@ export async function waitForUploadComplete(
|
||||
|
||||
return poll();
|
||||
}
|
||||
|
||||
// 업로드 히스토리 조회
|
||||
export async function getUploadHistory(
|
||||
tab: 'all' | 'completed' | 'scheduled' | 'failed' = 'all',
|
||||
options?: { year?: number; month?: number; platform?: string; page?: number; size?: number }
|
||||
): Promise<import('../types/api').UploadHistoryResponse> {
|
||||
const params = new URLSearchParams({ tab });
|
||||
if (options?.year) params.set('year', String(options.year));
|
||||
if (options?.month) params.set('month', String(options.month));
|
||||
if (options?.platform) params.set('platform', options.platform);
|
||||
if (options?.page) params.set('page', String(options.page));
|
||||
if (options?.size) params.set('size', String(options.size));
|
||||
const response = await authenticatedFetch(
|
||||
`${API_URL}/social/upload/history?${params.toString()}`,
|
||||
{ method: 'GET' }
|
||||
);
|
||||
if (!response.ok) throw new Error('히스토리 조회 실패');
|
||||
return response.json();
|
||||
}
|
||||
|
||||
// 예약 업로드 취소
|
||||
export async function cancelUpload(uploadId: number): Promise<{ success: boolean; message: string }> {
|
||||
const response = await authenticatedFetch(
|
||||
`${API_URL}/social/upload/${uploadId}`,
|
||||
{ method: 'DELETE' }
|
||||
);
|
||||
if (!response.ok) throw new Error('취소 실패');
|
||||
return response.json();
|
||||
}
|
||||
|
||||
// 업로드 재시도
|
||||
export async function retryUpload(uploadId: number): Promise<{ success: boolean; message: string }> {
|
||||
const response = await authenticatedFetch(
|
||||
`${API_URL}/social/upload/${uploadId}/retry`,
|
||||
{ method: 'POST' }
|
||||
);
|
||||
if (!response.ok) throw new Error('재시도 실패');
|
||||
return response.json();
|
||||
}
|
||||
Reference in new issue
Block a user