File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { postRecruitmentNotify } from '@/services/api/recruitment/recruitment.api' ;
2+ import { useMutation } from '@tanstack/react-query' ;
3+
4+ export const useSubscribeRecruitmentNotify = ( ) => {
5+ return useMutation ( {
6+ mutationFn : postRecruitmentNotify ,
7+ } ) ;
8+ } ;
Original file line number Diff line number Diff line change 1+ import { RecruitmentNotifyRequest } from '@/schemas/recruitment/recruitment.schema' ;
2+ import { publicAxios } from '@/services/config/axios' ;
3+ import { ENDPOINT } from '@/services/constant/endpoint' ;
4+ import { handleApiError } from '@/services/utils/apiHelper' ;
5+
6+ /** 모집 알림 구독 신청 */
7+ export const postRecruitmentNotify = async (
8+ data : RecruitmentNotifyRequest
9+ ) : Promise < void > => {
10+ try {
11+ await publicAxios . post ( ENDPOINT . RECRUITMENT . SUBSCRIBE , data ) ;
12+ } catch ( error ) {
13+ return handleApiError ( error ) ;
14+ }
15+ } ;
You can’t perform that action at this time.
0 commit comments