Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/chat/modal/ReportModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import EmptyPlus from '@/assets/icon/chatPlusTouchFriend.svg?react';
import { useState } from 'react';
import DefaultProfileImage from '@/assets/icon/basicProfileIcon.svg?react';
import postFriends from '@/libs/apis/friend/postFriends.api';
import postBlacklist from '@/libs/apis/blackList/postBlackList.api';
import postToBlacklist from '@/libs/apis/blackList/postToBlackList.api';
import { useToast } from '@/contexts/ToastContext';

interface ReportModalProps {
Expand Down Expand Up @@ -43,7 +43,7 @@ const ReportModal: React.FC<ReportModalProps> = ({

const handleBlacklist = async () => {
try {
const res = await postBlacklist(senderId);
const res = await postToBlacklist(senderId);
if (res.code === 201) {
openToast(`${senderName}님이 블랙리스트에 추가되었습니다.`, 'success');
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import client from '../clients';

const postBlacklist = async (senderId: number) => {
const postToBlacklist = async (senderId: number) => {
try {
const res = await client.post(`/api/blacklists?receiverId=${senderId}`);
return res.data;
Expand All @@ -9,4 +9,4 @@ const postBlacklist = async (senderId: number) => {
}
};

export default postBlacklist;
export default postToBlacklist;