-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #110 from ablej-ssafy/feature/58-portfolio
[#58]feat: 이력서 업로드 버튼 추가
- Loading branch information
Showing
26 changed files
with
732 additions
and
158 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,27 @@ | ||
'use server'; | ||
|
||
import {revalidatePath} from 'next/cache'; | ||
import {cookies} from 'next/headers'; | ||
import {redirect} from 'next/navigation'; | ||
|
||
import ableJ from '@/services/ableJ'; | ||
import {ChangeResumeOrderForm} from '@/types/ableJ'; | ||
|
||
const changeResumeOrderAction = async (data: ChangeResumeOrderForm) => { | ||
const cookieStore = cookies(); | ||
const accessToken = cookieStore.get('accessToken')?.value; | ||
|
||
if (!accessToken) { | ||
redirect('/signin'); | ||
} | ||
|
||
const {success} = await ableJ.changeResumeOrder(data, accessToken); | ||
|
||
if (!success) { | ||
console.error('포트폴리오 순서를 업데이트하는데 실패했습니다.'); | ||
} | ||
|
||
revalidatePath('/portfolio'); | ||
}; | ||
|
||
export default changeResumeOrderAction; |
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,27 @@ | ||
'use server'; | ||
import {revalidatePath} from 'next/cache'; | ||
import {cookies} from 'next/headers'; | ||
import {redirect, RedirectType} from 'next/navigation'; | ||
|
||
import ableJ from '@/services/ableJ'; | ||
|
||
const changeToAiParsedResumeAction = async () => { | ||
const cookieStore = cookies(); | ||
const accessToken = cookieStore.get('accessToken')?.value; | ||
|
||
if (!accessToken) { | ||
redirect('/signin'); | ||
} | ||
|
||
const {success} = await ableJ.changeToAiParsedResume(accessToken); | ||
|
||
if (!success) { | ||
console.error('AI 포트폴리오로 교체하는데 실패했습니다'); | ||
return; | ||
} | ||
|
||
revalidatePath('/portfolio'); | ||
redirect('/portfolio', RedirectType.replace); | ||
}; | ||
|
||
export default changeToAiParsedResumeAction; |
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,20 @@ | ||
'use server'; | ||
|
||
import {cookies} from 'next/headers'; | ||
import {redirect} from 'next/navigation'; | ||
|
||
import ableJ from '@/services/ableJ'; | ||
|
||
const toggleResumeVisibilityAction = async (isPrivate: boolean) => { | ||
const accessToken = cookies().get('accessToken')?.value; | ||
|
||
if (!accessToken) { | ||
console.log('Access Token이 없습니다.'); | ||
redirect('/(.)signin'); | ||
} | ||
|
||
const request = isPrivate ? ableJ.hideResume : ableJ.revealResume; | ||
await request(accessToken as string); | ||
}; | ||
|
||
export default toggleResumeVisibilityAction; |
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
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
Oops, something went wrong.