refac: endpoints regarding db operations

This commit is contained in:
Timothy J. Baek
2024-08-27 14:01:00 +02:00
parent bbeed7cd85
commit 062649e483
4 changed files with 76 additions and 71 deletions

View File

@@ -156,7 +156,7 @@ export const deleteMemoryById = async (token: string, id: string) => {
export const deleteMemoriesByUserId = async (token: string) => {
let error = null;
const res = await fetch(`${WEBUI_API_BASE_URL}/memories/user`, {
const res = await fetch(`${WEBUI_API_BASE_URL}/memories/delete/user`, {
method: 'DELETE',
headers: {
Accept: 'application/json',

View File

@@ -400,7 +400,7 @@ export const resetUploadDir = async (token: string) => {
let error = null;
const res = await fetch(`${RAG_API_BASE_URL}/reset/uploads`, {
method: 'GET',
method: 'POST',
headers: {
Accept: 'application/json',
authorization: `Bearer ${token}`
@@ -426,7 +426,7 @@ export const resetVectorDB = async (token: string) => {
let error = null;
const res = await fetch(`${RAG_API_BASE_URL}/reset/db`, {
method: 'GET',
method: 'POST',
headers: {
Accept: 'application/json',
authorization: `Bearer ${token}`