Refactor: 수정된 DTO에 따른 api 수정

This commit is contained in:
정현조 2024-09-20 17:40:24 +09:00
parent 29829d7d0f
commit 336d6bd61e
2 changed files with 7 additions and 4 deletions

View File

@ -1,9 +1,9 @@
import api from '@/api/axiosConfig';
import { MemberSearchResponse } from '@/types';
import { MemberResponse } from '@/types';
export async function searchMembersByEmail(keyword: string) {
return api
.get<MemberSearchResponse[]>(`/members`, {
.get<MemberResponse[]>(`/members`, {
params: { keyword },
withCredentials: true,
})

View File

@ -90,10 +90,13 @@ export async function updateProjectMemberPrivilege(
}
// 프로젝트 멤버 삭제
export async function removeProjectMember(projectId: number, memberId: number, targetMemberId: number) {
export async function removeProjectMember(projectId: number, targetMemberId: number) {
return api
.delete(`/projects/${projectId}/members`, {
params: { memberId, targetMemberId },
data: targetMemberId,
headers: {
'Content-Type': 'application/json',
},
})
.then(({ data }) => data);
}