This commit is contained in:
Timothy Jaeryang Baek committed 2026-08-04 00:41:22 -05:00
1 parent e65aa7070d
commit d6734141e3
3 files changed
+4 -3

No files matched your search

+1 -1
View File
@@ -131,7 +131,7 @@ export const getChat = (chatId: string, modelId?: string) => {
return fetchJSON<ChatDetail>(`/api/chats/${chatId}${suffix}`);
};
export const getUsage = (days = 730) => fetchJSON<UsageResponse>(`/api/chats/usage?days=${days}`);
export const getUsage = () => fetchJSON<UsageResponse>('/api/chats/usage');
export const deleteChat = (chatId: string) =>
fetchJSON<{ ok: boolean }>(`/api/chats/${chatId}`, { method: 'DELETE' });
@@ -136,7 +136,7 @@
async function loadUsage() {
loading = true;
try {
usage = await getUsage(730);
usage = await getUsage();
} catch {
usage = null;
toast.error(tr('usage.failedToLoad'));