reiji-h 2 лет назад
Родитель
Сommit
2dab530f9f
1 измененных файлов с 5 добавлено и 2 удалено
  1. 5 2
      apps/app/src/components/PageEditor/PageEditor.tsx

+ 5 - 2
apps/app/src/components/PageEditor/PageEditor.tsx

@@ -17,7 +17,8 @@ import { useRouter } from 'next/router';
 import { throttle, debounce } from 'throttle-debounce';
 
 import { useUpdateStateAfterSave, useSaveOrUpdate } from '~/client/services/page-operation';
-import { apiGet, apiPostForm } from '~/client/util/apiv1-client';
+import { apiPostForm } from '~/client/util/apiv1-client';
+import { apiv3Get } from '~/client/util/apiv3-client';
 import { toastError, toastSuccess } from '~/client/util/toastr';
 import { OptionsToSave } from '~/interfaces/page-operation';
 import { SocketEventName } from '~/interfaces/websocket';
@@ -308,10 +309,12 @@ export const PageEditor = React.memo((props: Props): JSX.Element => {
     files.forEach(async(file) => {
       try {
         // eslint-disable-next-line @typescript-eslint/no-explicit-any
-        const resLimit: any = await apiGet('/attachments.limit', {
+        const resLimit: any = await apiv3Get('/attachments.limit', {
           fileSize: file.size,
         });
 
+        console.log(resLimit);
+
         if (!resLimit.isUploadable) {
           throw new Error(resLimit.errorMessage);
         }