feat(recipes): add recipe visibility and sharing features
- Implemented functionality to set recipe visibility (public/private) with appropriate checks for user permissions. - Added ability to share recipes with other users, including validation for existing users and permissions. - Introduced new DTOs for setting visibility and sharing recipes. - Updated RecipesController and RecipesService to handle new endpoints for visibility and sharing. - Enhanced inventory preview to consider user permissions and shared recipes. - Updated front-end to support new sharing and visibility features, including UI changes for recipe detail and admin user management.
This commit is contained in:
@@ -30,6 +30,9 @@ class RecipeApiPaths {
|
||||
static String detail(int id) => '/recipes/$id';
|
||||
static String update(int id) => '/recipes/$id';
|
||||
static String remove(int id) => '/recipes/$id';
|
||||
static String setVisibility(int id) => '/recipes/$id/visibility';
|
||||
static String share(int id) => '/recipes/$id/share';
|
||||
static String unshare(int id, String username) => '/recipes/$id/share/${Uri.encodeComponent(username)}';
|
||||
static String inventoryPreview(int id) => '/recipes/$id/inventory-preview';
|
||||
static const parseMarkdown = '/recipes/parse-markdown';
|
||||
}
|
||||
@@ -52,6 +55,7 @@ class UserApiPaths {
|
||||
static const list = '/users';
|
||||
static String setRole(int id) => '/users/$id/role';
|
||||
static String setPremium(int id) => '/users/$id/premium';
|
||||
static String setRecipeSharing(int id) => '/users/$id/recipe-sharing';
|
||||
static String updateEmail(int id) => '/users/$id/email';
|
||||
static String delete(int id) => '/users/$id';
|
||||
static String resetPassword(int id) => '/users/$id/reset-password';
|
||||
|
||||
Reference in New Issue
Block a user