diff --git a/src/services/teamService.ts b/src/services/teamService.ts index 6ccb7be3..a7c3f744 100644 --- a/src/services/teamService.ts +++ b/src/services/teamService.ts @@ -1,6 +1,6 @@ import { authAxios } from '@services/axiosProvider'; import type { AxiosRequestConfig } from 'axios'; -import type { User } from '@/types/UserType'; +import type { SearchUser, User } from '@/types/UserType'; import type { Team } from '@/types/TeamType'; /** @@ -11,14 +11,14 @@ import type { Team } from '@/types/TeamType'; * @param {Team['teamId']} teamId - 팀 아이디 * @param {User['nickname']} nickname - 유저 닉네임 * @param {AxiosRequestConfig} [axiosConfig={}] - axios 요청 옵션 설정 객체 - * @returns {Promise>} + * @returns {Promise>} */ -async function findUserByTeam( +export async function findUserByTeam( teamId: Team['teamId'], nickname: User['nickname'], axiosConfig: AxiosRequestConfig = {}, ) { - return authAxios.get(`/team/${teamId}/user/search?nickname=${nickname}`, axiosConfig); + return authAxios.get(`/team/${teamId}/user/search?nickname=${nickname}`, axiosConfig); } /** diff --git a/src/services/userService.ts b/src/services/userService.ts index e2f9ffdd..9166be27 100644 --- a/src/services/userService.ts +++ b/src/services/userService.ts @@ -1,6 +1,6 @@ import { authAxios } from '@services/axiosProvider'; import type { AxiosRequestConfig } from 'axios'; -import type { User } from '@/types/UserType'; +import type { SearchUser } from '@/types/UserType'; import type { TeamListWithApproval } from '@/types/TeamType'; /** @@ -10,10 +10,10 @@ import type { TeamListWithApproval } from '@/types/TeamType'; * @async * @param {User['nickname']} nickname - 유저 닉네임 * @param {AxiosRequestConfig} [axiosConfig={}] - axios 요청 옵션 설정 객체 - * @returns {Promise>} + * @returns {Promise>} */ -async function findUser(nickname: string, axiosConfig: AxiosRequestConfig = {}) { - return authAxios.get(`/user/search?nickname=${nickname}`, axiosConfig); +export async function findUser(nickname: string, axiosConfig: AxiosRequestConfig = {}) { + return authAxios.get(`/user/search?nickname=${nickname}`, axiosConfig); } /**