Hide the recipe link, pick the creating suggestion, refuse duplicate positions
Dinner detail review fixes for GET /api/v1/dinners/{id}:
- source is now {site_name} with no url. A stored source_url may be a
pasted or offered link carrying a personal token, and nothing can show
a stored link is free of one; the candidate flow keeps every page URL
on the server for the same reason, so the detail does too.
- why_picked comes from GetDinnerSuggestionReasons, which reads only
pending or accepted suggestions: a suggestion is only ever created with
a new dinner and declining one archives that dinner, so a declined row
never created a live dinner. More than one candidate row is an error
rather than a guess. sqlc regenerated.
- Two recipe ingredients or steps at one position leave recipe order
unknown, so the read fails rather than ordering them by id.
Maestro task 099e9952-7f98-4700-8369-241c589a1e9d.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -103,9 +103,13 @@ type Querier interface {
|
||||
// Returns sql.ErrNoRows until the row exists.
|
||||
GetChatSettings(ctx context.Context) (ChatSetting, error)
|
||||
GetDinner(ctx context.Context, id string) (Dinner, error)
|
||||
// The reason of the suggestion that created dinner_id, its earliest.
|
||||
// Returns sql.ErrNoRows for a dinner no suggestion created.
|
||||
GetDinnerSuggestionReason(ctx context.Context, dinnerID string) (string, error)
|
||||
// The reason of each suggestion of dinner_id that can have created it,
|
||||
// none for a dinner no suggestion created. A suggestion is only ever
|
||||
// created with a new dinner, and declining one archives its dinner, so a
|
||||
// live dinner's creating suggestion is pending (the dinner still
|
||||
// suggested) or accepted; a declined one did not create it. More than one
|
||||
// row means nothing records which did.
|
||||
GetDinnerSuggestionReasons(ctx context.Context, dinnerID string) ([]string, error)
|
||||
// Returns sql.ErrNoRows until the row exists.
|
||||
GetHouseholdSettings(ctx context.Context) (HouseholdSetting, error)
|
||||
// Returns sql.ErrNoRows until the row exists.
|
||||
|
||||
Reference in New Issue
Block a user