-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: organization 필드로 변경 * feat: User Property 조회 API 추가 * feat: 로깅 적용되지 않은 필드들 추가
- Loading branch information
Showing
3 changed files
with
53 additions
and
16 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,35 @@ | ||
import { useQuery } from '@tanstack/react-query'; | ||
import { z } from 'zod'; | ||
|
||
import { createEndpoint } from '@/api/typedAxios'; | ||
|
||
export const getMemberproperty = createEndpoint({ | ||
request: { | ||
method: 'GET', | ||
url: 'api/v1/members/property', | ||
}, | ||
serverResponseScheme: z.object({ | ||
id: z.number(), | ||
major: z.string(), | ||
job: z.string(), | ||
organization: z.string(), | ||
part: z.array(z.string()), | ||
generation: z.array(z.number()), | ||
coffeeChatStatus: z.string(), | ||
receivedCoffeeChatCount: z.number(), | ||
sentCoffeeChatCount: z.number(), | ||
}), | ||
}); | ||
|
||
/** | ||
* @desc Amplitude User Properties | ||
*/ | ||
export const useGetMemberProperty = () => { | ||
return useQuery({ | ||
queryKey: ['getMemberProperty'], | ||
queryFn: async () => { | ||
const data = await getMemberproperty.request(); | ||
return data; | ||
}, | ||
}); | ||
}; |
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
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