Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
ae42345
[SRLT-55] Feat: 사업계획서 조회하기 기능 개발
2ghrms Nov 11, 2025
6bf39d7
[SRLT-55] Test: 목록 조회 테스트 추가 및 기존 주석 처리 테스트 반영
2ghrms Nov 11, 2025
4e18890
[SRLT-55] Feat: 사업계획서 조회하기 기능 개발
2ghrms Nov 11, 2025
c6c8bab
[SRLT-55] Feat: 사업계획서 전체 서브섹션 조회 기능 개발
2ghrms Nov 11, 2025
48150ef
[SRLT-55] Chore: swagger summary 프론트가 보기쉽게 추가
2ghrms Nov 11, 2025
ce6eb88
[SRLT-52] Feat: 사용자의 프로필사진을 받아온다
SeongHo5356 Nov 12, 2025
b8200c3
[SRLT-55] Chore: JsonFormat으로 LocalDateTime 문자열화 전달하도록 변경
2ghrms Nov 12, 2025
28f3cbf
[SRLT-55] Chore: config 동기화
2ghrms Nov 12, 2025
b7d6b8b
Merge pull request #42 from StartUpLight/SRLT-55-사업-계획서-조회하기
2ghrms Nov 12, 2025
4edbd67
Merge pull request #45 from StartUpLight/SRLT-69-소셜-로그인시-프로필-이미지-변경
SeongHo5356 Nov 12, 2025
a26883c
[SRLT-71] Chore: SubSectionRequest를 SubSectionCreateRequest로 이름 변경하여 통일
2ghrms Nov 13, 2025
e837f54
[SRLT-71] Chore: SubSectionRequest를 SubSectionCreateRequest로 이름 변경하여 통일
2ghrms Nov 13, 2025
5f4a94b
[SRLT-71] Refactor: DTO 리팩토링
2ghrms Nov 13, 2025
1ee318b
[SRLT-71] Refactor: 변경 로직 테스트 코드에 적용
2ghrms Nov 13, 2025
c9d532a
[SRLT-71] Chore: DTO -> provided 이동 및 개행 수정
2ghrms Nov 13, 2025
963b708
[SRLT-71] Chore: DTO -> provided 이동 및 개행 수정
2ghrms Nov 13, 2025
aa55570
[SRLT-71] Refactor: DTO 리팩토링에 따른 서비스 및 컨트롤러 수정
2ghrms Nov 13, 2025
927252c
Merge pull request #47 from StartUpLight/SRLT-71-사업계획서-제목-조회
2ghrms Nov 14, 2025
2e8fca1
[SRLT-80] Refactor: 전문가 상세 정보를 응답에 포함한다
SeongHo5356 Nov 15, 2025
c6e6b3d
Merge pull request #48 from StartUpLight/SRLT-80-전문가-채점-변경사항-반영
SeongHo5356 Nov 15, 2025
6eff406
[SRLT-64] Chore: AiReportResponse -> provided 안으로 이동
2ghrms Nov 15, 2025
a89ae72
[SRLT-64] Chore: BusinessPlanContentExtractor util 패키지 이동
2ghrms Nov 15, 2025
eda6081
[SRLT-64] Feat: PDF로 사업계획서 생성 및 AI 리포트 생성 로직 작성
2ghrms Nov 15, 2025
a7e4d8a
[SRLT-64] Test: 변경 로직에 대한 테스트 코드 작성
2ghrms Nov 15, 2025
5a796f5
[SRLT-64] Refactor: 리뷰 반영
2ghrms Nov 15, 2025
e319e89
Merge pull request #49 from StartUpLight/SRLT-64-pdf-업로드-ai-리포트-생성
2ghrms Nov 15, 2025
c3cbf74
[SRLT-81] Chore: createOrUpdate -> upsert로 수정
2ghrms Nov 16, 2025
c388048
[SRLT-81] Chore: updateStatus 관련 버그 수정
2ghrms Nov 16, 2025
c4471c3
[SRLT-81] Refactor: 사업계획서 디폴트 제목 추가
2ghrms Nov 16, 2025
1146efd
[SRLT-81] Refactor: 사업계획서 목록 조회시에 PDF 기반으로 생성되면 url 반환하도록 수정
2ghrms Nov 16, 2025
5446881
[SRLT-81] Chore: 사업계획서 컨트롤러 메소드 명 수정
2ghrms Nov 16, 2025
2f9c4ee
[SRLT-81] Feat: 사업계획서 목록 조회시 Page 기반으로 페이지네이션 구현
2ghrms Nov 16, 2025
1b9f937
[SRLT-81] Test: 변경사항에 따른 테스트 수정
2ghrms Nov 16, 2025
d1d9027
[SRLT-81] Chore: 미사용 import 제거
2ghrms Nov 17, 2025
f271d29
Merge pull request #50 from StartUpLight/SRLT-81-사업계획서-목록-조회-페이지네이션-구…
2ghrms Nov 17, 2025
df34efa
[SRLT-85] Chore: BusinessPlanServiceImpl 메소드 구조 맞춰서 개행
2ghrms Nov 17, 2025
731397f
[SRLT-85] Feat: 이미지 width, height 입력받도록 DTO 수정
2ghrms Nov 17, 2025
f944e06
Merge pull request #51 from StartUpLight/SRLT-85-서브섹션-사진-사이즈-받도록-수정
2ghrms Nov 17, 2025
0aaaf58
[SRLT-80] Feat: 토큰 기반 조회는 필터인증에서 제외한다
SeongHo5356 Nov 18, 2025
00eb4a0
[SRLT-80] Fix: Lazy 로딩 문제를 해결한다
SeongHo5356 Nov 18, 2025
4a11007
[SRLT-80] Refactor: 전문가 링크 주소를 수정한다
SeongHo5356 Nov 18, 2025
5a18e0e
[SRLT-80] Chore: 워크플로우 적용시점을 변경한다
SeongHo5356 Nov 18, 2025
a20022b
Merge pull request #52 from StartUpLight/SRLT-80-전문가-채점-변경사항-반영
SeongHo5356 Nov 18, 2025
57bb671
[SRLT-80] Chore: 메인 브랜치 워크플로우 적용시점을 변경한다
SeongHo5356 Nov 18, 2025
5b5aa56
Merge pull request #54 from StartUpLight/SRLT-80-전문가-채점-변경사항-반영
SeongHo5356 Nov 18, 2025
2a7dc4a
[SRLT-80] Chore: 서브모듈 지칭 해시를 변경한다
SeongHo5356 Nov 18, 2025
5f201a7
Merge pull request #55 from StartUpLight/SRLT-80-전문가-채점-변경사항-반영
SeongHo5356 Nov 18, 2025
125a56a
[SRLT-97] Feat: 전문가 매칭에 따라서 사업계획서 상태를 업데이트한다
SeongHo5356 Nov 19, 2025
4706cd0
[SRLT-97] Chore: 워크플로우 적용시점을 변경한다
SeongHo5356 Nov 19, 2025
7c146b8
[SRLT-97] Chore: 이메일 템플릿을 변경한다
SeongHo5356 Nov 19, 2025
4c7a7ce
[SRLT-97] Chore: SaveType에 맞게 상태를 변경한다
SeongHo5356 Nov 19, 2025
8d032f6
Merge pull request #56 from StartUpLight/SRLT-97-QA-사항-반영
SeongHo5356 Nov 19, 2025
6ef9178
[SRLT-97] Chore: 전문가를 로딩할때, 한번에 로딩한다
SeongHo5356 Nov 19, 2025
baa0bf2
[SRLT-97] Chore: staging client를 등록한다
SeongHo5356 Nov 19, 2025
f406271
Merge pull request #57 from StartUpLight/SRLT-97-QA-사항-반영
SeongHo5356 Nov 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci-prd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Deployment Workflow
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build-and-push:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-stg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Deployment Workflow
on:
push:
branches: [ "develop" ]
# pull_request:
# branches: [ "develop" ]
pull_request:
branches: [ "develop" ]

jobs:
build-and-push:
Expand Down
2 changes: 1 addition & 1 deletion config
14 changes: 3 additions & 11 deletions src/main/java/starlight/adapter/ai/OpenAiReportGrader.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
import org.springframework.stereotype.Component;
import starlight.adapter.ai.infra.OpenAiGenerator;
import starlight.adapter.ai.util.AiReportResponseParser;
import starlight.adapter.ai.util.BusinessPlanContentExtractor;
import starlight.application.aireport.dto.AiReportResponse;
import starlight.application.aireport.provided.dto.AiReportResponse;
import starlight.application.aireport.required.AiReportGrader;
import starlight.domain.businessplan.entity.BusinessPlan;

/**
* AI 리포트 채점을 오케스트레이션하는 컴포넌트
Expand All @@ -20,18 +18,12 @@
public class OpenAiReportGrader implements AiReportGrader {

private final OpenAiGenerator chatClientGenerator;
private final BusinessPlanContentExtractor contentExtractor;
private final AiReportResponseParser responseParser;

@Override
public AiReportResponse grade(BusinessPlan businessPlan) {
// 1. BusinessPlan에서 컨텐츠 추출
String businessPlanContent = contentExtractor.extractContent(businessPlan);
public AiReportResponse gradeContent(String content){
String llmResponse = chatClientGenerator.generateReport(content);

// 2. LLM 호출
String llmResponse = chatClientGenerator.generateReport(businessPlanContent);

// 3. 응답 파싱
return responseParser.parse(llmResponse);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import starlight.application.aireport.dto.AiReportResponse;
import starlight.application.aireport.provided.dto.AiReportResponse;
import starlight.domain.aireport.entity.AiReport;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,50 @@

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import starlight.adapter.auth.security.auth.AuthDetails;
import starlight.application.aireport.dto.AiReportResponse;
import starlight.adapter.businessplan.webapi.dto.BusinessPlanCreateWithPdfRequest;
import starlight.application.aireport.provided.dto.AiReportResponse;
import starlight.application.aireport.provided.AiReportService;
import starlight.shared.apiPayload.response.ApiResponse;

@Validated
@RestController
@RequiredArgsConstructor
@RequestMapping("/v1/ai-reports/{planId}")
@RequestMapping("/v1/ai-reports")
@Tag(name = "AI 리포트", description = "AI 리포트 채점 및 조회 API")
public class AiReportController {

private final AiReportService aiReportService;

@Operation(summary = "사업계획서를 AI로 채점 및 생성합니다.")
@PostMapping("/grade")
@PostMapping("/evaluation/{planId}")
public ApiResponse<AiReportResponse> gradeBusinessPlan(
@AuthenticationPrincipal AuthDetails authDetails,
@PathVariable Long planId
) {
return ApiResponse.success(aiReportService.gradeBusinessPlan(planId, authDetails.getMemberId()));
}

@Operation(summary = "PDF URL을 기반으로 사업계획서를 생성하고, AI로 채점 및 생성합니다.")
@PostMapping("/evaluation/pdf")
public ApiResponse<AiReportResponse> createAndGradeBusinessPlan(
@AuthenticationPrincipal AuthDetails authDetails,
@Valid @RequestBody BusinessPlanCreateWithPdfRequest request
) {
return ApiResponse.success(aiReportService.createAndGradePdfBusinessPlan(
request.title(),
request.pdfUrl(),
authDetails.getMemberId()
));
}

@Operation(summary = "AI 리포트를 조회합니다.")
@GetMapping
@GetMapping("/{planId}")
public ApiResponse<AiReportResponse> getAiReport(
@AuthenticationPrincipal AuthDetails authDetails,
@PathVariable Long planId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ public OAuth2User loadUser(OAuth2UserRequest request) throws OAuth2Authenticatio
memberRepository.save(Member.newSocial(parsed.name(), parsed.email(), parsed.provider(), parsed.providerId(), null, MemberType.FOUNDER, parsed.profileImageUrl()))
);

String newImage = parsed.profileImageUrl();
if (newImage != null && !newImage.isBlank() && (member.getProfileImageUrl() == null || !member.getProfileImageUrl().equals(newImage))) {
member.updateProfileImage(newImage);

memberRepository.save(member);
}

return AuthDetails.of(member, oAuth2User.getAttributes(), parsed.nameAttributeKey());
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package starlight.adapter.businessplan.persistence;

import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Repository;
import starlight.application.businessplan.required.BusinessPlanQuery;
import starlight.domain.businessplan.entity.BusinessPlan;
Expand Down Expand Up @@ -29,4 +31,9 @@ public BusinessPlan save(BusinessPlan businessPlan) {
public void delete(BusinessPlan businessPlan) {
businessPlanRepository.delete(businessPlan);
}

@Override
public Page<BusinessPlan> findPreviewPage(Long memberId, Pageable pageable) {
return businessPlanRepository.findAllByMemberIdOrderedByLastSavedAt(memberId, pageable);
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package starlight.adapter.businessplan.persistence;

import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Page;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import starlight.domain.businessplan.entity.BusinessPlan;

import java.util.Optional;
Expand All @@ -10,4 +14,12 @@ public interface BusinessPlanRepository extends JpaRepository<BusinessPlan, Long

@EntityGraph(attributePaths = { "feasibility", "problemRecognition", "growthTactic", "teamCompetence", "overview" })
Optional<BusinessPlan> findById(Long id);

@Query("""
SELECT bp
FROM BusinessPlan bp
WHERE bp.memberId = :memberId
ORDER BY COALESCE(bp.modifiedAt, bp.createdAt) DESC, bp.id DESC
""")
Page<BusinessPlan> findAllByMemberIdOrderedByLastSavedAt(@Param("memberId") Long memberId, Pageable pageable);
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,27 @@

import com.fasterxml.jackson.databind.ObjectMapper;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import starlight.adapter.auth.security.auth.AuthDetails;
import starlight.adapter.businessplan.webapi.dto.BusinessPlanCreateRequest;
import starlight.adapter.businessplan.webapi.dto.BusinessPlanResponse;
import starlight.adapter.businessplan.webapi.dto.SubSectionRequest;
import starlight.application.businessplan.dto.SubSectionResponse;
import starlight.adapter.businessplan.webapi.dto.BusinessPlanCreateWithPdfRequest;
import starlight.adapter.businessplan.webapi.dto.SubSectionCreateRequest;
import starlight.application.businessplan.provided.dto.BusinessPlanResponse;
import starlight.application.businessplan.provided.dto.SubSectionResponse;
import starlight.application.businessplan.provided.BusinessPlanService;
import starlight.domain.businessplan.entity.BusinessPlan;
import starlight.domain.businessplan.enumerate.SubSectionType;
import starlight.shared.apiPayload.response.ApiResponse;

import java.util.List;

@Validated
@RestController
@RequiredArgsConstructor
Expand All @@ -28,83 +33,130 @@ public class BusinessPlanController {
private final BusinessPlanService businessPlanService;
private final ObjectMapper objectMapper;

@Operation(summary = "사업 계획서를 삭제합니다.")
@DeleteMapping("/{planId}")
public ApiResponse<?> deleteBusinessPlan(
@GetMapping
@Operation(summary = "사업 계획서 목록을 조회합니다. (마이페이지 용)")
public ApiResponse<BusinessPlanResponse.PreviewPage> getBusinessPlanList(
@AuthenticationPrincipal AuthDetails authDetails,
@Parameter(description = "페이지 번호 (1 이상 정수)") @RequestParam(defaultValue = "1") int page,
@Parameter(description = "페이지 크기 (기본 3)") @RequestParam(defaultValue = "3") int size
) {
int zeroBasedPage = Math.max(0, page - 1);
Pageable pageable = PageRequest.of(zeroBasedPage, size);
return ApiResponse.success(businessPlanService.getBusinessPlanList(
authDetails.getMemberId(), pageable
));
}

@GetMapping("/{planId}/subsections")
@Operation(summary = "사업 계획서의 제목과 모든 서브섹션 내용을 조회합니다. (미리보기 용)")
public ApiResponse<BusinessPlanResponse.Detail> getBusinessPlanDetail(
@AuthenticationPrincipal AuthDetails authDetails,
@PathVariable Long planId
) {
return ApiResponse.success(businessPlanService.getBusinessPlanDetail(
planId, authDetails.getMemberId()
));
}

@GetMapping("/{planId}/titles")
@Operation(summary = "사업 계획서의 제목을 조회합니다.")
public ApiResponse<String> getBusinessPlanTitle(
@AuthenticationPrincipal AuthDetails authDetails,
@PathVariable Long planId
) {
businessPlanService.deleteBusinessPlan(planId, authDetails.getMemberId());
return ApiResponse.success();
return ApiResponse.success(businessPlanService
.getBusinessPlanInfo(planId, authDetails.getMemberId())
.title()
);
}

@PostMapping
@Operation(summary = "사업 계획서를 생성합니다.")
public ApiResponse<?> createBusinessPlan(
public ApiResponse<BusinessPlanResponse.Result> createBusinessPlan(
@AuthenticationPrincipal AuthDetails authDetails
) {
BusinessPlan businessPlan = businessPlanService.createBusinessPlan(authDetails.getMemberId());
) {
return ApiResponse.success(businessPlanService.createBusinessPlan(authDetails.getMemberId()));
}

return ApiResponse.success(BusinessPlanResponse.from(businessPlan.getId(), businessPlan.getTitle(), businessPlan.getPlanStatus()));
@PostMapping("/pdf")
@Operation(summary = "PDF URL을 기반으로 사업계획서를 생성합니다.")
public ApiResponse<BusinessPlanResponse.Result> createBusinessPlanWithPdfAndAiReport(
@AuthenticationPrincipal AuthDetails authDetails,
@Valid @RequestBody BusinessPlanCreateWithPdfRequest request
) {
return ApiResponse.success(businessPlanService.createBusinessPlanWithPdf(
request.title(), request.pdfUrl(), authDetails.getMemberId()
));
}

@PatchMapping("/{planId}")
@Operation(summary = "사업 계획서 제목을 수정합니다.")
public ApiResponse<BusinessPlanResponse> updateBusinessPlanTitle(
public ApiResponse<String> updateBusinessPlanTitle(
@AuthenticationPrincipal AuthDetails authDetails,
@RequestBody @Valid BusinessPlanCreateRequest request,
@PathVariable Long planId
) {
BusinessPlan businessPlan = businessPlanService.updateBusinessPlanTitle(planId, authDetails.getMemberId(), request.title());
return ApiResponse.success(businessPlanService.updateBusinessPlanTitle(
planId, request.title(), authDetails.getMemberId()
));
}

return ApiResponse.success(BusinessPlanResponse.from(businessPlan.getId(), businessPlan.getTitle(), businessPlan.getPlanStatus()));
@Operation(summary = "사업 계획서를 삭제합니다.")
@DeleteMapping("/{planId}")
public ApiResponse<BusinessPlanResponse.Result> deleteBusinessPlan(
@AuthenticationPrincipal AuthDetails authDetails,
@PathVariable Long planId
) {
return ApiResponse.success(businessPlanService.deleteBusinessPlan(
planId, authDetails.getMemberId()
));
}

@Operation(summary = "서브섹션을 생성 또는 수정합니다.")
@PostMapping("/{planId}/subsections")
public ApiResponse<SubSectionResponse.Created> createOrUpdateSubSection(
public ApiResponse<SubSectionResponse.Result> upsertSubSection(
@AuthenticationPrincipal AuthDetails authDetails,
@PathVariable Long planId,
@Valid @RequestBody SubSectionRequest request
@Valid @RequestBody SubSectionCreateRequest request
) {
return ApiResponse.success(businessPlanService.createOrUpdateSubSection(
return ApiResponse.success(businessPlanService.upsertSubSection(
planId, objectMapper.valueToTree(request), request.checks(), request.subSectionType(), authDetails.getMemberId()
));
}

@Operation(summary = "서브섹션을 조회합니다.")
@GetMapping("/{planId}/subsections/{subSectionType}")
public ApiResponse<SubSectionResponse.Retrieved> getSubSection(
public ApiResponse<SubSectionResponse.Detail> getSubSection(
@AuthenticationPrincipal AuthDetails authDetails,
@PathVariable Long planId,
@PathVariable SubSectionType subSectionType
) {
return ApiResponse.success(businessPlanService.getSubSection(
planId, subSectionType, authDetails.getMemberId())
);
return ApiResponse.success(businessPlanService.getSubSectionDetail(
planId, subSectionType, authDetails.getMemberId()
));
}

@Operation(summary = "서브섹션을 삭제합니다.")
@DeleteMapping("/{planId}/subsections/{subSectionType}")
public ApiResponse<SubSectionResponse.Deleted> deleteSubSection(
@Operation(summary = "서브섹션의 체크리스트를 점검 후 업데이트합니다.")
@PostMapping("/{planId}/subsections/check-and-update")
public ApiResponse<List<Boolean>> checkAndUpdateSubSection(
@AuthenticationPrincipal AuthDetails authDetails,
@PathVariable Long planId,
@PathVariable SubSectionType subSectionType
@Valid @RequestBody SubSectionCreateRequest request
) {
return ApiResponse.success(businessPlanService.deleteSubSection(
planId, subSectionType, authDetails.getMemberId())
);
return ApiResponse.success(businessPlanService.checkAndUpdateSubSection(
planId, objectMapper.valueToTree(request), request.subSectionType(), authDetails.getMemberId()
));
}

@Operation(summary = "서브섹션의 체크리스트를 점검 후 업데이트합니다.")
@PostMapping("/{planId}/subsections/check-and-update")
public ApiResponse<java.util.List<Boolean>> checkAndUpdateSubSection(
@Operation(summary = "서브섹션을 삭제합니다.")
@DeleteMapping("/{planId}/subsections/{subSectionType}")
public ApiResponse<SubSectionResponse.Result> deleteSubSection(
@AuthenticationPrincipal AuthDetails authDetails,
@PathVariable Long planId,
@Valid @RequestBody SubSectionRequest request
@PathVariable SubSectionType subSectionType
) {
return ApiResponse.success(businessPlanService.checkAndUpdateSubSection(
planId, objectMapper.valueToTree(request), request.subSectionType(), authDetails.getMemberId()
return ApiResponse.success(businessPlanService.deleteSubSection(
planId, subSectionType, authDetails.getMemberId()
));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import starlight.adapter.businessplan.spellcheck.dto.Finding;
import starlight.adapter.businessplan.webapi.swagger.SpellCheckApiDoc;
import starlight.application.businessplan.required.SpellChecker;
import starlight.adapter.businessplan.webapi.dto.SubSectionRequest;
import starlight.adapter.businessplan.webapi.dto.SubSectionCreateRequest;
import starlight.application.businessplan.util.PlainTextExtractUtils;
import starlight.shared.apiPayload.response.ApiResponse;

Expand All @@ -26,9 +26,9 @@ public class SpellController implements SpellCheckApiDoc {

@Override
public ApiResponse<SpellCheckResponse> check(
@Valid @RequestBody SubSectionRequest subSectionRequest
@Valid @RequestBody SubSectionCreateRequest subSectionCreateRequest
) {
String text = PlainTextExtractUtils.extractPlainText(objectMapper, subSectionRequest);
String text = PlainTextExtractUtils.extractPlainText(objectMapper, subSectionCreateRequest);

List<Finding> typos = spellChecker.check(text);
String corrected = spellChecker.applyTopSuggestions(text, typos);
Expand Down
Loading
Loading