Skip to content

Commit

Permalink
[feat] 시연용 테스트API 삭제 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
minwoo0419 committed Aug 30, 2024
1 parent 3926a61 commit 97c4e2a
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.telepigeon.server.controller;

import com.telepigeon.server.domain.Answer;
import com.telepigeon.server.domain.Profile;
import com.telepigeon.server.domain.Question;
import com.telepigeon.server.domain.Token;
Expand Down Expand Up @@ -96,10 +95,10 @@ public ResponseEntity<Void> testQuestion(
Profile profile2 = profileRetriever.findById(93L);
Question question1 = questionRetriever.findFirstByProfile(profile1);
Question question2 = questionRetriever.findFirstByProfile(profile2);
Answer answer1 = answerRetriever.findByQuestion(question1);
Answer answer2 = answerRetriever.findByQuestion(question2);
answerRepository.delete(answer1);
answerRepository.delete(answer2);
if (answerRetriever.existsByQuestion(question1))
answerRepository.delete(answerRetriever.findByQuestion(question1));
if (answerRetriever.existsByQuestion(question2))
answerRepository.delete(answerRetriever.findByQuestion(question2));
questionRepository.delete(question1);
questionRepository.delete(question2);
questionService.create(profile1);
Expand Down

0 comments on commit 97c4e2a

Please sign in to comment.