Skip to content

Chore/develop#5

Open
DavidTimi1 wants to merge 6 commits into
mainfrom
chore/develop
Open

Chore/develop#5
DavidTimi1 wants to merge 6 commits into
mainfrom
chore/develop

Conversation

@DavidTimi1
Copy link
Copy Markdown
Owner

What Changed?

  • Added utility functions in app/lib/cookies.ts to get, set, and delete cookies for storing recipe and session data, and updated session cookie duration to one week.

  • Updated app/lib/helpers.ts to use the new cookie utilities for session management, replacing previous methods.

    • Save generated recipes temporarily in cookies during the POST request instead of immediately saving to the database.
    • Add a new PUT endpoint that retrieves the recipe from the cookie and saves it to the database, then cleans up the cookie.
  • In app/actions/recipe_action.ts, added the ensureRecipeSaved function to reliably persist recipes to the database with retry logic after initial generation.

  • Updated app/actions/retrieve_recipe_action.ts to attempt to retrieve a recipe from cookies if not found in the database, providing a better user experience in case of partial saves.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Mar 27, 2026

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

Project Deployment Actions Updated (UTC)
pic2plate Ready Ready Preview, Comment Mar 27, 2026 5:35pm

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