Skip to content

Commit

Permalink
[#5] feat: Apply 개발 진행 중
Browse files Browse the repository at this point in the history
  • Loading branch information
sycuuui committed Jan 22, 2024
1 parent 31927a3 commit b393a51
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
public class ApplyController {
private final ApplyService applyService;
//지원 요청 api
@PostMapping("/1")
public ResponseEntity<Apply> addApply(@AuthenticationPrincipal Member member, @RequestBody AddApplyReq req){
Apply savedApply = applyService.save(member,req);
return ResponseEntity.status(HttpStatus.CREATED).body(savedApply);
}
// @PostMapping("/1")
// public ResponseEntity<Apply> addApply(@AuthenticationPrincipal Member member, @RequestBody AddApplyReq req){
// Apply savedApply = applyService.save(member,req);
// return ResponseEntity.status(HttpStatus.CREATED).body(savedApply);
// }
//특정 지원자 지원서 가져오는 api
// @GetMapping("/apply/{post_id}/application")
// public ResponseEntity<ApplyMemberRes> findMemberApplication(@RequestHeader Long member_id){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.gongjakso.server.domain.apply.dto;

import lombok.Getter;

@Getter
public record ApplyMemberRes(
String application,
String recruit_part,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.util.Optional;

public interface ApplyRepository extends JpaRepository<Apply,Long> {
Optional<Apply> findByMemberId(Long memberId);
// Optional<Apply> findByMemberId(Long memberId);

// Apply findApplyByMemberMemberId();
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public Apply save(Member member,AddApplyReq req){
return applyRepository.save(apply);
}
public Apply findMemberApplication(Long memberId){
return applyRepository.findByMemberId(memberId)
.orElse(null);
// return applyRepository.findByMemberId(memberId)
// .orElse(null);
return null;
}
}

0 comments on commit b393a51

Please sign in to comment.