Skip to content

Commit bf16898

Browse files
committed
fix: planService return error fix
1 parent d2a7fea commit bf16898

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/main/java/com/back/domain/study/plan/service/StudyPlanService.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import com.back.domain.study.plan.dto.StudyPlanResponse;
55
import com.back.domain.study.plan.entity.RepeatRule;
66
import com.back.domain.study.plan.entity.StudyPlan;
7-
import com.back.domain.study.plan.entity.StudyStatus;
87
import com.back.domain.study.plan.repository.StudyPlanRepository;
98
import lombok.RequiredArgsConstructor;
109
import org.springframework.stereotype.Service;
@@ -24,7 +23,6 @@ public StudyPlanResponse createStudyPlan(Long userId, StudyPlanCreateRequest req
2423
StudyPlan studyPlan = new StudyPlan();
2524
//studyPlan.setUser(user);
2625
studyPlan.setSubject(request.getSubject());
27-
studyPlan.setStatus(StudyStatus.TODO);
2826
studyPlan.setStartDate(request.getStartDate());
2927
studyPlan.setEndDate(request.getEndDate());
3028
studyPlan.setColor(request.getColor());
@@ -56,8 +54,8 @@ public StudyPlanResponse createStudyPlan(Long userId, StudyPlanCreateRequest req
5654
studyPlan.setRepeatRule(repeatRule);
5755
}
5856

59-
StudyPlan savedStudyPlan = studyPlanRepository.save(studyPlan);
60-
return convertToResponse(savedStudyPlan);
57+
StudyPlanResponse rs =new StudyPlanResponse(studyPlanRepository.save(studyPlan));
58+
return rs;
6159
}
6260

6361

0 commit comments

Comments
 (0)