Skip to content

Commit

Permalink
add .
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatyana-js committed Feb 6, 2025
1 parent 1223f86 commit def584d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
18 changes: 1 addition & 17 deletions frontend/src/api/chatApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const chatApi = createApi({
}),
endpoints: (builder) => ({
getChannels: builder.query({ // Каналы
query: () => '/channels',
query: () => '/channel',
providesTags: ['Channels'],
}),
addChannel: builder.mutation ({
Expand Down Expand Up @@ -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'],
}),
}),
});

Expand All @@ -78,5 +63,4 @@ export const {
useAddMessageMutation,
useRenameChannelMutation,
useRemoveChannelMutation,
useRemoveMessageMutation,
} = chatApi;
5 changes: 0 additions & 5 deletions frontend/src/init.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand All @@ -80,7 +76,6 @@ const init = async () => {
<ErrorBoundary>
<Provider store={store}>
<StrictMode>
<TestError />
<App />
<ToastContainer />
</StrictMode>
Expand Down

0 comments on commit def584d

Please sign in to comment.