Skip to content

💫 [feature] - 관리자 검수 pending에 photoUrl/imageUrls 추가 - #115

Merged
yn2511 merged 2 commits into
developfrom
feat/admin-review-presigned-urls
Jul 23, 2026
Merged

yn2511 merged 2 commits into
developfrom
feat/admin-review-presigned-urls

Conversation

@yn2511

@yn2511 yn2511 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

#️⃣ Issue Number

  • N/A

📝 요약(Summary)

  • GET /api/v1/admin/missions/completions/pending 응답에 photoUrl 추가
  • GET /api/v1/admin/community-missions/proofs/pending 응답에 imageUrls 추가
  • 기존 photoKey / imageKeys 유지 (additive)
  • S3 presigned GET URL (app.storage.s3.presigned-url-duration-seconds, 기본 600초)

📝 리뷰 요청사항

💻 테스트 결과

  • AdminMissionReview*Test, AdminCommunityMissionReview*Test 통과

Notion

  • API 명세에 필드 반영 완료

Summary by CodeRabbit

  • New Features
    • Added temporary, presigned image URLs to enable review preview for pending mission completion photos.
    • Added temporary, presigned image URLs to enable review preview for pending community mission proof images.
    • Updated review API responses and documentation to include these preview URLs.
  • Tests
    • Extended test coverage to verify presigned URL fields are populated and returned correctly for both admin review flows.

photoKey/imageKeys는 유지하고 photoUrl/imageUrls를 응답에 추가한다.
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 90a4a525-5ca5-4bfb-bfc4-76e16690601d

📥 Commits

Reviewing files that changed from the base of the PR and between ce6b0cc and 2174ba2.

📒 Files selected for processing (1)
  • src/test/kotlin/com/zerost/api/mission/application/AdminMissionReviewQueryServiceTest.kt
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/test/kotlin/com/zerost/api/mission/application/AdminMissionReviewQueryServiceTest.kt

📝 Walkthrough

Walkthrough

Pending mission and community mission review APIs now generate S3 presigned GET URLs from stored image keys. Response DTOs expose these URLs, and application/controller tests validate URL generation and serialization.

Changes

Admin review presigned URLs

Layer / File(s) Summary
Presigned URL helper
src/main/kotlin/com/zerost/api/file/application/FileUploadService.kt
Adds createPresignedGetUrl, delegating to the existing S3 presigning logic.
Community proof review URLs
src/main/kotlin/com/zerost/api/communitymission/..., src/test/kotlin/com/zerost/api/communitymission/...
Orders proof image keys and maps each key to a presigned imageUrl; updates DTO metadata and application/controller assertions.
Mission completion review URLs
src/main/kotlin/com/zerost/api/mission/..., src/test/kotlin/com/zerost/api/mission/...
Adds photoUrl to pending mission completion responses and validates service mapping and controller serialization.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • team-0st/BE#20: Adds the existing S3 presigning implementation reused by this change.
  • team-0st/BE#33: Introduces the administrator mission review query flow extended here.
  • team-0st/BE#69: Overlaps with the community mission proof review flow updated here.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change by stating admin pending review responses add photoUrl/imageUrls.
Description check ✅ Passed The description includes the required sections and clearly summarizes the API changes and tests.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/admin-review-presigned-urls

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/test/kotlin/com/zerost/api/mission/application/AdminMissionReviewQueryServiceTest.kt (1)

27-37: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Make the presigning stub match the fixture’s actual photoKey.

photoKey is never passed to createMissionCompletion, so the service signs completion.photoKey, not necessarily this local value. Derive the variable from completion.photoKey or pass it explicitly into the fixture; otherwise the stub and assertion can target the wrong key.

Proposed fix
         val completion = createMissionCompletion(
             id = 12L,
             user = user,
             mission = mission,
             status = MissionCompletionStatus.PENDING,
         )
-        val photoKey = "missions/1/1/2026/07/18/mission-1.jpg"
+        val photoKey = completion.photoKey

Also applies to: 47-48

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/test/kotlin/com/zerost/api/mission/application/AdminMissionReviewQueryServiceTest.kt`
around lines 27 - 37, Update the test setup around createMissionCompletion so
the photoKey used by createPresignedGetUrl and its assertions matches
completion.photoKey; either derive the local variable from completion.photoKey
or pass the intended key explicitly into the fixture, ensuring the stub targets
the key the service actually signs.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In
`@src/test/kotlin/com/zerost/api/mission/application/AdminMissionReviewQueryServiceTest.kt`:
- Around line 27-37: Update the test setup around createMissionCompletion so the
photoKey used by createPresignedGetUrl and its assertions matches
completion.photoKey; either derive the local variable from completion.photoKey
or pass the intended key explicitly into the fixture, ensuring the stub targets
the key the service actually signs.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b9652c34-d18a-49e3-be55-c5d7b97ea21b

📥 Commits

Reviewing files that changed from the base of the PR and between d1f4997 and ce6b0cc.

📒 Files selected for processing (9)
  • src/main/kotlin/com/zerost/api/communitymission/application/AdminCommunityMissionReviewQueryService.kt
  • src/main/kotlin/com/zerost/api/communitymission/presentation/dto/AdminCommunityMissionProofReviewItemResponse.kt
  • src/main/kotlin/com/zerost/api/file/application/FileUploadService.kt
  • src/main/kotlin/com/zerost/api/mission/application/AdminMissionReviewQueryService.kt
  • src/main/kotlin/com/zerost/api/mission/presentation/dto/AdminMissionReviewItemResponse.kt
  • src/test/kotlin/com/zerost/api/communitymission/application/AdminCommunityMissionReviewQueryServiceTest.kt
  • src/test/kotlin/com/zerost/api/communitymission/presentation/AdminCommunityMissionReviewControllerTest.kt
  • src/test/kotlin/com/zerost/api/mission/application/AdminMissionReviewQueryServiceTest.kt
  • src/test/kotlin/com/zerost/api/mission/presentation/AdminMissionReviewControllerTest.kt

@yn2511

yn2511 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

CodeRabbit 리뷰 반영: AdminMissionReviewQueryServiceTest에서 presign stub을 completion.photoKey 기준으로 맞춤 (2174ba2).

@yn2511
yn2511 merged commit dc86974 into develop Jul 23, 2026
2 checks passed
@yn2511
yn2511 deleted the feat/admin-review-presigned-urls branch July 23, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant