From def584d80960ac44c9114523a1a80142675f0778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A2=D0=B0=D1=82=D1=8C=D1=8F=D0=BD=D0=B0=20=D0=90=D0=BD?= =?UTF-8?q?=D0=B4=D1=80=D0=B5=D0=B5=D0=B2=D0=B0?= Date: Thu, 6 Feb 2025 20:18:43 +0400 Subject: [PATCH] add . --- frontend/src/api/chatApi.js | 18 +----------------- frontend/src/init.jsx | 5 ----- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/frontend/src/api/chatApi.js b/frontend/src/api/chatApi.js index 2e0c74b..5944784 100644 --- a/frontend/src/api/chatApi.js +++ b/frontend/src/api/chatApi.js @@ -15,7 +15,7 @@ export const chatApi = createApi({ }), endpoints: (builder) => ({ getChannels: builder.query({ // Каналы - query: () => '/channels', + query: () => '/channel', providesTags: ['Channels'], }), addChannel: builder.mutation ({ @@ -53,21 +53,6 @@ export const chatApi = createApi({ }), invalidatesTags: ['Messages'], }), - removeMessage: builder.mutation ({ - query: (id) => ({ - url: `/messages/${id}`, - method: 'DELETE', - }), - invalidatesTags: ['Messages'], - }), - renameMessage: builder.mutation ({ - query: ({ id, body }) => ({ - url: `/channels/${id}`, - method: 'PATCH', - body: { name }, - }), - invalidatesTags: ['Channels', 'Messages'], - }), }), }); @@ -78,5 +63,4 @@ export const { useAddMessageMutation, useRenameChannelMutation, useRemoveChannelMutation, - useRemoveMessageMutation, } = chatApi; \ No newline at end of file diff --git a/frontend/src/init.jsx b/frontend/src/init.jsx index 109f626..26f4ccf 100644 --- a/frontend/src/init.jsx +++ b/frontend/src/init.jsx @@ -66,10 +66,6 @@ const init = async () => { accessToken: '45c668d145bf4e379844b7f78319daf0', environment: 'production', }; - const TestError = () => { - const element = null; - console.log(element.map(el => el)); - }; filter.add(filter.getDictionary('en')); filter.add(filter.getDictionary('ru')); @@ -80,7 +76,6 @@ const init = async () => { -