mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-16 00:59:40 +02:00
fix(picture): update API client to v1 endpoint and rename steps param
- Change API base path from /api to /api/v1 for all fetch calls - Rename numInferenceSteps to steps in generate params to match backend 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
6f8585e9bb
commit
833a828cfb
4 changed files with 6 additions and 6 deletions
|
|
@ -38,7 +38,7 @@ export async function fetchApi<T>(
|
|||
headers['Authorization'] = `Bearer ${authToken}`;
|
||||
}
|
||||
|
||||
const response = await fetch(`${API_BASE}/api${endpoint}`, {
|
||||
const response = await fetch(`${API_BASE}/api/v1${endpoint}`, {
|
||||
method,
|
||||
headers,
|
||||
body: isFormData ? (body as FormData) : body ? JSON.stringify(body) : undefined,
|
||||
|
|
@ -89,7 +89,7 @@ export async function uploadFile(
|
|||
headers['Authorization'] = `Bearer ${authToken}`;
|
||||
}
|
||||
|
||||
const response = await fetch(`${API_BASE}/api${endpoint}`, {
|
||||
const response = await fetch(`${API_BASE}/api/v1${endpoint}`, {
|
||||
method: 'POST',
|
||||
headers,
|
||||
body: formData,
|
||||
|
|
@ -137,7 +137,7 @@ export async function uploadFiles(
|
|||
headers['Authorization'] = `Bearer ${authToken}`;
|
||||
}
|
||||
|
||||
const response = await fetch(`${API_BASE}/api${endpoint}`, {
|
||||
const response = await fetch(`${API_BASE}/api/v1${endpoint}`, {
|
||||
method: 'POST',
|
||||
headers,
|
||||
body: formData,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export interface GenerateImageJobParams {
|
|||
negativePrompt?: string;
|
||||
width?: number;
|
||||
height?: number;
|
||||
numInferenceSteps?: number;
|
||||
steps?: number;
|
||||
guidanceScale?: number;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export interface GenerateImageParams {
|
|||
negativePrompt?: string;
|
||||
width?: number;
|
||||
height?: number;
|
||||
numInferenceSteps?: number;
|
||||
steps?: number;
|
||||
guidanceScale?: number;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@
|
|||
modelId: selectedModelId,
|
||||
width: advancedSettings.aspectRatio.width,
|
||||
height: advancedSettings.aspectRatio.height,
|
||||
numInferenceSteps: advancedSettings.steps,
|
||||
steps: advancedSettings.steps,
|
||||
guidanceScale: advancedSettings.guidanceScale,
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue