Skip to content

Conversation

@hyotatoFrappuccino
Copy link
Collaborator

Resolved Issue

PR Description

public record ApplicationFormDocumentRequest(
        Long id,
-       Long documentId
)
  • 기존에 지원서-문서 연결 요청 Dto에서 불필요하게 id값을 2개 받아 업데이트 코드가 잘못 구현된 문제를 해결하였습니다.

요청 예시
get /documents

{
	"id": 5,
	"type": "RESUME",
	"title": "배민 이력서",
	"lastModifiedDate": "2025-09-02",
	"latestVersion": 1,
	"applicationForms": []
},
{
	"id": 6,
	"type": "RESUME",
	"title": "네이버 이력서",
	"lastModifiedDate": "2025-09-02",
	"latestVersion": 1,
	"applicationForms": []
},
{
	"id": 7,
	"type": "RESUME",
	"title": "카카오 이력서",
	"lastModifiedDate": "2025-09-02",
	"latestVersion": 2,
	"applicationForms": []
},
{
	"id": 8,
	"type": "RESUME",
	"title": "쿠팡 이력서",
	"lastModifiedDate": "2025-09-02",
	"latestVersion": 3,
	"applicationForms": []
}

post /application-forms

{
  "companyName": "네이버",
  "companyAddress": "경기도",
  "companyUrl": "naver.com",
  "companyScale": "대기업",
  "position": "백엔드 개발자",
  "status": "PLANNED",
  "documents": [
    {
      "id": 5
    },
    {
      "id": 6
    }
  ]
}

get /application-forms/1

{
	"id": 1,
	"companyName": "네이버",
	"companyAddress": "경기도",
	"companyUrl": "naver.com",
	"companyScale": "대기업",
	"position": "백엔드 개발자",
	"status": "PLANNED",
	"schedules": [],
	"documents": [
		{
			"id": 5,
			"type": "RESUME",
			"title": "배민 이력서"
		},
		{
			"id": 6,
			"type": "RESUME",
			"title": "네이버 이력서"
		}
	]
}

이 상태에서
5(배민 이력서)는 유지
6(네이버 이력서)는 삭제
7(카카오 이력서), 8(쿠팡 이력서)를 추가하고 싶다면

put /application-forms/1

{
	"companyName": "네이버",
	"companyAddress": "경기도",
	"companyUrl": "naver.com",
	"companyScale": "대기업",
	"position": "백엔드 개발자",
	"status": "PLANNED",
	"schedules": [],
	"documents": [
		{
			"id": 5
		},
		{
			"id": 7
		},
		{
			"id": 8
		}
	]
}

get /application-forms/1

{
	"id": 1,
	"companyName": "네이버",
	"companyAddress": "경기도",
	"companyUrl": "naver.com",
	"companyScale": "대기업",
	"position": "백엔드 개발자",
	"status": "PLANNED",
	"schedules": [],
	"documents": [
		{
			"id": 5,
			"type": "RESUME",
			"title": "배민 이력서"
		},
		{
			"id": 7,
			"type": "RESUME",
			"title": "카카오 이력서"
		},
		{
			"id": 8,
			"type": "RESUME",
			"title": "쿠팡 이력서"
		}
	]
}

@hyotatoFrappuccino hyotatoFrappuccino merged commit afaf57e into dev Sep 2, 2025
3 checks passed
@hyotatoFrappuccino hyotatoFrappuccino deleted the fix/#91 branch September 2, 2025 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: 지원서-문서 연결 업데이트 오류 수정

3 participants