Skip to content

Commit

Permalink
refactor: edit parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Chan531 committed Nov 30, 2024
1 parent cd1897f commit 4cec824
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void achieveMemberMission(long memberId, long missionId) {
memberMissionAdapter.update(memberMission);
memberMissionAdapter.flush();
memberMissionAdapter.delete(memberMission);
missionHistoryAdapter.save(memberMission.getId(), memberMission.getMemberId());
missionHistoryAdapter.save(memberMission);
}

public Optional<GetMemberMissionResponse> getMemberMission(long memberId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import org.springframework.stereotype.Component;

import com.soptie.server.domain.membermission.MemberMission;
import com.soptie.server.persistence.entity.mission.MissionHistoryEntity;
import com.soptie.server.persistence.repository.mission.MissionHistoryRepository;

Expand All @@ -14,8 +15,8 @@
public class MissionHistoryAdapter {
private final MissionHistoryRepository historyRepository;

public void save(long memberMissionId, long memberId) {
historyRepository.save(new MissionHistoryEntity(memberMissionId, memberId));
public void save(final MemberMission memberMission) {
historyRepository.save(new MissionHistoryEntity(memberMission.getMissionId(), memberMission.getMemberId()));
}

public void deleteById(long historyId) {
Expand Down

0 comments on commit 4cec824

Please sign in to comment.