fix: pinned chats in ref chat
This commit is contained in:
@@ -112,6 +112,7 @@ export const importChat = async (
|
||||
export const getChatList = async (
|
||||
token: string = '',
|
||||
page: number | null = null,
|
||||
include_pinned: boolean = false,
|
||||
include_folders: boolean = false
|
||||
) => {
|
||||
let error = null;
|
||||
@@ -125,6 +126,10 @@ export const getChatList = async (
|
||||
searchParams.append('include_folders', 'true');
|
||||
}
|
||||
|
||||
if (include_pinned) {
|
||||
searchParams.append('include_pinned', 'true');
|
||||
}
|
||||
|
||||
const res = await fetch(`${WEBUI_API_BASE_URL}/chats/?${searchParams.toString()}`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
const getItemsPage = async () => {
|
||||
itemsLoading = true;
|
||||
let res = await getChatList(localStorage.token, page, true).catch(() => {
|
||||
let res = await getChatList(localStorage.token, page, true, true).catch(() => {
|
||||
return [];
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user