-
Notifications
You must be signed in to change notification settings - Fork 4
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
geumbin
committed
Apr 19, 2024
1 parent
36a960d
commit b6c314d
Showing
11 changed files
with
637 additions
and
672 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,15 @@ | ||
// post | ||
export interface PostSurveyRequest { | ||
age: number; | ||
gender: string; | ||
occupation: string; | ||
region: string; | ||
source: string; | ||
purpose: string; | ||
} | ||
|
||
export interface PostSurveyResponse { | ||
code: number; | ||
message: string; | ||
data: string; | ||
} |
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,13 @@ | ||
import { PostSurveyRequest, PostSurveyResponse } from '../@types/Survey'; | ||
import axiosInstance from '../axiosConfig'; | ||
|
||
// post 요청 | ||
export const PostSurvey = async (requestData: PostSurveyRequest): Promise<PostSurveyResponse> => { | ||
try { | ||
const response = await axiosInstance.post<PostSurveyResponse>('/surveys/response', requestData); | ||
console.log('설문조사 전송 성공', response.data); | ||
return response.data; | ||
} catch (error) { | ||
throw new Error('실패'); | ||
} | ||
}; |
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
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.