Shun Miyazawa 1 год назад
Родитель
Сommit
30dccbf987

+ 2 - 2
apps/app/src/client/components/Admin/AiIntegration/AiIntegration.tsx

@@ -2,7 +2,7 @@ import { useCallback } from 'react';
 
 import { useTranslation } from 'react-i18next';
 
-import { apiv3Put } from '~/client/util/apiv3-client';
+import { apiv3Post } from '~/client/util/apiv3-client';
 import { toastSuccess, toastError } from '~/client/util/toastr';
 
 
@@ -11,7 +11,7 @@ export const AiIntegration = (): JSX.Element => {
 
   const clickRebuildVectorStoreButtonHandler = useCallback(async() => {
     try {
-      await apiv3Put('/openai/rebuild-vector-store');
+      await apiv3Post('/openai/rebuild-vector-store');
       toastSuccess(t('ai_integration.rebuild_vector_store_succeeded'));
     }
     catch {

+ 1 - 1
apps/app/src/server/routes/apiv3/openai/index.ts

@@ -7,6 +7,6 @@ const router = express.Router();
 
 module.exports = (crowi) => {
   router.post('/chat', chatHandlersFactory(crowi));
-  router.put('/rebuild-vector-store', rebuildVectorStoreHandlersFactory(crowi));
+  router.post('/rebuild-vector-store', rebuildVectorStoreHandlersFactory(crowi));
   return router;
 };