Skip to content

Commit

Permalink
API Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
unanchoi committed Jan 16, 2024
1 parent cbc435a commit a2fc6cd
Show file tree
Hide file tree
Showing 14 changed files with 102 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,5 @@ application-secret.properties
application.properties

screen

http-client.private.env.json
18 changes: 18 additions & 0 deletions http/application/create-application.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
POST {{host}}/api/application
Authorization: Bearer {{token}}
Content-Type: application/json

{
"isAgreed": true,
"name": "홍길동",
"gender": "male/femail",
"studentNumber": "20190315",
"major": "소프트웨어학부",
"multiMajor": "수학",
"semester": "3-2",
"phone": "010-1234-5678",
"email": "[email protected]",
"pathToKnow": "string",
"etcDetail": "인터넷 검색",
"part": "PM"
}
3 changes: 3 additions & 0 deletions http/application/get-application-page1.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// get from http-client.private.env.json
GET {{host}}/api/application/1/page1
Authorization: Bearer {{token}}
3 changes: 3 additions & 0 deletions http/application/get-application-page2.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// get from http-client.private.env.json
GET {{host}}/api/application/1/page2
Authorization: Bearer {{token}}
3 changes: 3 additions & 0 deletions http/application/get-application-page3.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// get from http-client.private.env.json
GET {{host}}/api/application/1/page3
Authorization: Bearer {{token}}
3 changes: 3 additions & 0 deletions http/application/get-application-page4.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// get from http-client.private.env.json
GET {{host}}/api/application/1/page4
Authorization: Bearer {{token}}
43 changes: 43 additions & 0 deletions http/application/update-interview-page1.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// get from http-client.private.env.json
PATCH {{host}}/api/application/1/page4
Authorization: Bearer {{token}}
Content-Type: application/json

{
"firstDay": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"secondDay": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"thirdDay": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}
12 changes: 12 additions & 0 deletions http/application/update-interview-page2.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// get from http-client.private.env.json
PATCH {{host}}/api/application/1/page4
Authorization: Bearer {{token}}
Content-Type: application/json

{
"commonAnswer1": "공통질문1",
"commonAnswer2": "공통질문2",
"commonAnswer3": "공통질문3",
"commonAnswer4": "공통질문4",
"commonAnswer5": "공통질문5"
}
12 changes: 12 additions & 0 deletions http/application/update-interview-page3.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// get from http-client.private.env.json
PATCH {{host}}/api/application/1/page3
Authorization: Bearer {{token}}
Content-Type: application/json

{
"commonAnswer1": "공통질문1",
"commonAnswer2": "공통질문2",
"commonAnswer3": "공통질문3",
"commonAnswer4": "공통질문4",
"commonAnswer5": "공통질문5"
}
1 change: 0 additions & 1 deletion http/google-login.http

This file was deleted.

1 change: 1 addition & 0 deletions http/interview/get-interview-detail.http
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GET https://startlion.kro.kr/api/interviews/1
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public void updateApplicationPage1(ApplicationPage1Request request) {
this.studentNumber = request.studentNumber();
this.isPersonalInformationAgreed = request.isAgreed();

if (ApplyPart.valueOf(request.part()) == ApplyPart.PLAN) {
if (ApplyPart.valueOf(request.part()) == ApplyPart.PM) {
this.partAnswer1Limit = PLAN_PART_ANSWER_LIMIT;
this.partAnswer2Limit = PLAN_PART_ANSWER_LIMIT;
this.partAnswer3Limit = PLAN_PART_ANSWER_LIMIT;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ public enum ApplyPart {
BE("백엔드"),
FE("프론트엔드"),
DESIGN("디자인"),
PLAN("기획");
PM("기획");
private final String name;
}

0 comments on commit a2fc6cd

Please sign in to comment.