mirror of
https://github.com/open-webui/open-webui
synced 2025-06-22 18:07:17 +00:00
Update index.ts
This commit is contained in:
parent
05ffb9363f
commit
e97bd47336
@ -92,7 +92,11 @@ export const getFolderById = async (token: string, id: string) => {
|
||||
return res;
|
||||
};
|
||||
|
||||
export const updateFolderNameById = async (token: string, id: string, name: string) => {
|
||||
export const updateFolderById = async (
|
||||
token: string,
|
||||
id: string,
|
||||
folderData: { name: string; system_prompt?: string }
|
||||
) => {
|
||||
let error = null;
|
||||
|
||||
const res = await fetch(`${WEBUI_API_BASE_URL}/folders/${id}/update`, {
|
||||
@ -102,9 +106,7 @@ export const updateFolderNameById = async (token: string, id: string, name: stri
|
||||
'Content-Type': 'application/json',
|
||||
authorization: `Bearer ${token}`
|
||||
},
|
||||
body: JSON.stringify({
|
||||
name: name
|
||||
})
|
||||
body: JSON.stringify(folderData)
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (!res.ok) throw await res.json();
|
||||
|
Loading…
Reference in New Issue
Block a user