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 () => { -