-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[feat] 채팅방 삭제 기능 구현
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { api } from './axios.config.ts'; | ||
|
||
export const deleteChat = async (chatId: number) => { | ||
try { | ||
const response = await api.delete(`chattings/rooms/${chatId}`); | ||
return response.data; | ||
} catch (error) { | ||
console.error('chat delete api request error : ', error); | ||
throw error; | ||
} | ||
}; | ||
|
||
export const getChats = async (meetingId: number) => { | ||
try { | ||
const response = await api.get(`/chats/${meetingId}`); | ||
return response.data.data; | ||
} catch (error) { | ||
console.error('chat get api request error : ', error); | ||
throw error; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters