feat(planning): add GET /v1/week-plans/{planId}/variety-preview endpoint

Returns currentScore, projectedScore, and scoreDelta when a recipe
would be added on a given date. Used by C6 desktop day picker.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-08 22:36:03 +02:00
parent a52b0a9d24
commit 7175b56833
5 changed files with 170 additions and 0 deletions

View File

@@ -96,4 +96,14 @@ public class WeekPlanController {
UUID householdId = householdResolver.resolve(principal.getName());
return planningService.getVarietyScore(householdId, id);
}
@GetMapping("/{planId}/variety-preview")
public VarietyPreviewResponse getVarietyPreview(
Principal principal,
@PathVariable UUID planId,
@RequestParam UUID recipeId,
@RequestParam LocalDate date) {
UUID householdId = householdResolver.resolve(principal.getName());
return planningService.getVarietyPreview(householdId, planId, recipeId, date);
}
}