This includes backend updates as well as frontend changes! The backend also includes a new repository to get a list of jobs via their IDs, which does respect order! The list displays for users that are logged in and a small message when the user is not logged in. The last piece is the recipe of the week segment, which can be as simple as a DB cron-job. But that will require stored procedures. Need to learn those next. Though I want to deploy the application soon, so I need to begin working on that.
14 lines
512 B
Go
14 lines
512 B
Go
package domain
|
|
|
|
type RecipeRepository interface {
|
|
CreateRecipe(recipe *Recipe) error
|
|
GetRecipe(id int, userId *int) (*Recipe, error)
|
|
GetRecipes(ids []int, userId *int) ([]Recipe, error)
|
|
SearchRecipes(filters SearchFilters, userId *int, favorites bool) ([]Recipe, error)
|
|
CreateRecipeTags(recipe Recipe, tags []string) error
|
|
GetUserRecipes(id int) ([]Recipe, error)
|
|
GetUserFavoriteRecipes(id int) ([]Recipe, error)
|
|
GetRecipeTags(recipe *Recipe) error
|
|
GetRecipeFavorite(recipe *Recipe, userId int) error
|
|
}
|