-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/4bujak-4bujak/frontend i…
…nto feature/meetingroomQA
- Loading branch information
Showing
50 changed files
with
1,262 additions
and
338 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,9 +1,25 @@ | ||
/* 일대일 문의 전체 조회 */ | ||
|
||
import { getRequest } from '../request'; | ||
import { QuestionType } from '../types/question'; | ||
import { getRequest, postRequest } from '../request'; | ||
import { | ||
PostQuestionTypeResponse, | ||
QuestionPost, | ||
GetQuestionType | ||
} from '../types/question'; | ||
|
||
export const userinfo = async () => { | ||
const response = await getRequest<QuestionType>('privatePosts'); | ||
export const questioninfo = async () => { | ||
const response = await getRequest<GetQuestionType>( | ||
`privatePosts?page=1&size=100&sort=string` | ||
); | ||
return response; | ||
}; | ||
|
||
/* 일대일 문의 등록 */ | ||
|
||
export const registerquestion = async ({ title, content, branchName }: QuestionPost) => { | ||
const response = await postRequest<PostQuestionTypeResponse, QuestionPost>( | ||
'privatePosts', | ||
{ title, content, branchName } | ||
); | ||
return response; | ||
}; |
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 |
---|---|---|
@@ -1,20 +1,32 @@ | ||
// import { Branch } from './branch'; | ||
import { ICommon } from './common'; | ||
export interface QuestionPost { | ||
title: string; | ||
content: string; | ||
branchName: string | undefined; | ||
} | ||
|
||
interface QuestionPost { | ||
interface QuestionGet { | ||
id: number; | ||
title: string; | ||
content: string; | ||
branchName: string; | ||
createdDate: string; | ||
answer: { | ||
privatePostAnswerId: number; | ||
content: string; | ||
}; | ||
} | ||
|
||
interface QuestionPosttResponse { | ||
privatePostList: QuestionPost[]; | ||
interface QuestionGetResponse { | ||
privatePostList: QuestionGet[]; | ||
hasNext: boolean; | ||
} | ||
|
||
interface Message { | ||
message: string; | ||
interface QuestionMessage { | ||
id: number; | ||
} | ||
|
||
export type QuestionType = ICommon<QuestionPosttResponse & Message>; | ||
export type GetQuestionType = ICommon<QuestionGetResponse>; | ||
|
||
export type PostQuestionTypeResponse = ICommon<QuestionMessage>; |
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.