瀏覽代碼

add: use skip and limit in api call

Aryan Kothari 9 月之前
父節點
當前提交
d11961626c
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/lib/apis/chats/index.ts

+ 2 - 2
src/lib/apis/chats/index.ts

@@ -32,10 +32,10 @@ export const createNewChat = async (token: string, chat: object) => {
 	return res;
 	return res;
 };
 };
 
 
-export const getChatList = async (token: string = '') => {
+export const getChatList = async (token: string = '', skip: number = 0, limit: number = -1) => {
 	let error = null;
 	let error = null;
 
 
-	const res = await fetch(`${WEBUI_API_BASE_URL}/chats/`, {
+	const res = await fetch(`${WEBUI_API_BASE_URL}/chats/?skip=${skip}&limit=${limit}`, {
 		method: 'GET',
 		method: 'GET',
 		headers: {
 		headers: {
 			Accept: 'application/json',
 			Accept: 'application/json',