summaryrefslogtreecommitdiff
path: root/model/recipes.go
AgeCommit message (Collapse)Author
4 hoursWIP: Add JSON-based API under `/api`step-re-orderingxengineering
TODO: Not all the information is provided there. This commit provides an unstable JSON API for communication with an upcoming Dart frontend. Later it might be part of the public interface for integration into other services. For this step it has to be ensured the semantics are not changing a lot in the future which is currently out of scope.
2024-11-03model: Implement favorite recipesxengineering
This adds the ability to store a flag `is_favorite` inside the database. The corresponding SQL migration is part of this commit. Furthermore the Go code in the model package is adapted.
2024-10-12model: Fix direct access to databasexengineering
Instead a database transaction has to be used. Each database interaction should be wrapped into a transaction to make sure any possible change (even side-effects) can be rolled back in case of errors.
2024-09-11Apply go fmt to all source filesxengineering
This applies default Go code style recommendations.
2024-03-04model: Create test data with Go instead of SQLxengineering
This allows to formulate the test data with an object-based model which is easier than writing it down in a relational model.
2024-02-11model: Add type 'Recipes' with Read() methodxengineering
This type is provided to render overview pages easily with a list of all recipes.