This pull request implements full CRUD (Create, Read, Update, Delete) functionality for managing cocktails within the application.
Note: Currently, the difficulty level is not being stored in the database when adding or editing cocktails.
Features Implemented:
Adding Cocktails:
Users can create new cocktails by filling out a detailed form, including the title, description, ingredients, preparation steps, category, difficulty level (not stored), and an image.
Upon successful submission, cocktails are saved in the database and users are redirected to the cocktail’s view page with a user-friendly URL.
Editing Cocktails:
Users can edit their existing cocktails, with the form pre-filled with current data for easy updates.
Validation checks ensure all required fields are completed before updates are applied.
After editing, users are redirected to the updated cocktail’s view page.
Deleting Cocktails:
Users can delete their cocktails with a confirmation prompt to prevent accidental deletions.
Only the owner of the cocktail or an admin can delete it.
Upon successful deletion, users are redirected to the home page.
Additional Changes:
Implemented error handling and validation to enhance user experience.
Ensured authorization checks to maintain data integrity and security.
Pull Request Description
This pull request implements full CRUD (Create, Read, Update, Delete) functionality for managing cocktails within the application.
Note: Currently, the difficulty level is not being stored in the database when adding or editing cocktails.
Features Implemented:
Adding Cocktails:
Editing Cocktails:
Deleting Cocktails:
Additional Changes: