-
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.
- Loading branch information
Showing
7 changed files
with
142 additions
and
66 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { ApplicationPreviewType } from "@/types/applicationPreview.type" | ||
import { instance } from "../interceptor" | ||
import { cookies } from "next/headers" | ||
import { PostSearchType } from "@/types" | ||
|
||
interface GetApplicationDataResponseType { | ||
posts: ApplicationPreviewType[] | ||
} | ||
|
||
export const getApplicationData = async (token: string, data: PostSearchType) => { | ||
return await instance<GetApplicationDataResponseType>({ | ||
method: 'GET', | ||
url: '/post/search', | ||
params: data, | ||
headers: { | ||
Authorization: `Bearer ${token}` | ||
} | ||
}) | ||
} |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './postLink' | ||
export * from './postFile' | ||
export * from './getRecommend' | ||
export * from './getRecommend' | ||
export * from './getApplicationData' |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export { type PostLinkType } from './postLink.type' | ||
export { type UploadTipType } from './uploadTip.type' | ||
export { type UploadTipType } from './uploadTip.type' | ||
export { type PostSearchType } from './postSearch.type' |
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,8 @@ | ||
import { ApplicationFileType, MajorType } from ".." | ||
|
||
export interface PostSearchType { | ||
keyword: string | ||
kind: 'everything' | ApplicationFileType | ||
major: MajorType, | ||
sort: 'ASC' | 'DESC' | ||
} |