chore: images create

This commit is contained in:
jialin
2024-11-22 10:00:34 +08:00
parent c3473673da
commit dde937f460
52 changed files with 1883 additions and 941 deletions
+13 -3
View File
@@ -65,9 +65,19 @@ export const createImages = async (
},
options?: any
) => {
return request(`${CREAT_IMAGE_API}`, {
const res = await fetch(`${CREAT_IMAGE_API}`, {
method: 'POST',
data: params,
cancelToken: options?.cancelToken
body: JSON.stringify(params),
signal: options.signal,
headers: {
'Content-Type': 'application/json'
}
});
if (!res.ok) {
return {
error: true,
data: await res.json()
};
}
return res.json();
};