diff --git a/frontend/app/common/api.ts b/frontend/app/common/api.ts index 77347dff..c4d61208 100644 --- a/frontend/app/common/api.ts +++ b/frontend/app/common/api.ts @@ -99,6 +99,9 @@ export const addComment = ({ export const updateComment = ({ text, id }: { text: string; id: Comment['id'] }): Promise => apiFetcher.put(`/comment/${id}`, { url }, { text }); +export const removeMyComment = (id: Comment['id']): Promise => + apiFetcher.put(`/comment/${id}`, { url }, { delete: true }); + export const getPreview = (text: string): Promise => apiFetcher.post('/preview', {}, { text }); export const getUser = (): Promise => apiFetcher.get('/user').catch(() => null); @@ -154,9 +157,6 @@ export const removeVerifiedStatus = (id: User['id']): Promise => export const removeComment = (id: Comment['id']): Promise => adminFetcher.delete(`/comment/${id}`, { url }); -export const removeMyComment = (id: Comment['id']): Promise => - adminFetcher.put(`/comment/${id}`, { url }, { delete: true }); - export const blockUser = ( id: User['id'], ttl: BlockTTL