Skip to content

Make Save to plant profile actually file the check - #37

Merged
benweru merged 1 commit into
mainfrom
feature/save-to-plant-profile
Nov 3, 2026
Merged

benweru merged 1 commit into
mainfrom
feature/save-to-plant-profile

Conversation

@benweru

@benweru benweru commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Fixes the Save to plant profile button, which showed 'Saved to plant profile' and redirected without ever creating a plant - standalone checks had no path into a profile. Adds POST /api/plants/from-check (creates a plant named from the photo and files the check via the existing store; 401 signed-out, 400 malformed), wires the button with Saving and failure states (EN/SW), and stamps the plantId onto the result and history entry so the check is not filed twice. 270/270 tests, lint/tsc/build clean.

The button only showed a saved state and redirected; no plant was ever
created for a standalone check. Add POST /api/plants/from-check, which
creates a plant named from the photo and files the check under it, and
wire the button to it with saving and failure states (EN/SW). The result
and history entry gain the plantId so the check is not filed twice.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
bedsense Ready Ready Preview Nov 3, 2026 6:47pm UTC

@benweru
benweru merged commit 5560c49 into main Nov 3, 2026
4 checks passed
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