modificari mari

This commit is contained in:
Daniel Bedeleanu
2026-04-15 15:20:45 +03:00
parent 6102ff39aa
commit 1893c4f38b
15 changed files with 1154 additions and 898 deletions

View File

@@ -247,5 +247,21 @@ export const inventoryApi = {
updateAiPrompt: async (prompt: string) => {
const res = await axiosInstance.post('/admin/db/settings/prompt', { value: prompt });
return res.data;
},
getAiConfig: async () => {
const res = await axiosInstance.get('/admin/db/settings/ai');
return res.data;
},
updateAiProvider: async (provider: string) => {
const res = await axiosInstance.post('/admin/db/settings/ai', { provider });
return res.data;
},
updateAiKeys: async (keys: { gemini_api_key?: string, claude_api_key?: string }) => {
const res = await axiosInstance.post('/admin/db/settings/ai-keys', keys);
return res.data;
},
testAiKey: async (provider: string, key: string) => {
const res = await axiosInstance.post('/admin/db/settings/test-ai-key', { provider, key });
return res.data;
}
};