feat: 图片广场优化
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { get, post } from '@/utils/request';
|
||||
import type {
|
||||
GenerateImageRequest,
|
||||
ImageModel,
|
||||
@@ -7,6 +6,7 @@ import type {
|
||||
TaskListResponse,
|
||||
TaskStatusResponse,
|
||||
} from './types';
|
||||
import { del, get, post } from '@/utils/request';
|
||||
|
||||
export function generateImage(data: GenerateImageRequest) {
|
||||
return post<string>('/ai-image/generate', data).json();
|
||||
@@ -30,4 +30,9 @@ export function publishImage(data: PublishImageRequest) {
|
||||
|
||||
export function getImageModels() {
|
||||
return post<ImageModel[]>('/ai-image/model').json();
|
||||
}
|
||||
}
|
||||
|
||||
export function deleteMyTasks(taskIds: string[]) {
|
||||
// return del<void>(`/ai-image/my-tasks/${taskIds}`).json();
|
||||
return del<void>('/ai-image/my-tasks', { json: taskIds }).json();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user