mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 07:39:41 +02:00
feature/recipe-comments (#448)
* fix favorite color issue * db and models for comments * rename files * initial UI for comments * fix format * import / export * fixes #428 * format Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
parent
6f38fcf81b
commit
2b97af5728
22 changed files with 360 additions and 19 deletions
|
@ -1,4 +1,3 @@
|
|||
import json
|
||||
import re
|
||||
from enum import Enum
|
||||
from itertools import groupby
|
||||
|
@ -81,8 +80,6 @@ class PathObject(BaseModel):
|
|||
def get_path_objects(app: FastAPI):
|
||||
paths = []
|
||||
|
||||
with open("scratch.json", "w") as f:
|
||||
f.write(json.dumps(app.openapi()))
|
||||
for key, value in app.openapi().items():
|
||||
if key == "paths":
|
||||
for key, value in value.items():
|
|
@ -107,6 +107,12 @@ class AppRoutes:
|
|||
def recipes_recipe_slug_image(self, recipe_slug):
|
||||
return f"{self.prefix}/recipes/{recipe_slug}/image"
|
||||
|
||||
def recipes_slug_comments(self, slug):
|
||||
return f"{self.prefix}/recipes/{slug}/comments"
|
||||
|
||||
def recipes_slug_comments_id(self, slug, id):
|
||||
return f"{self.prefix}/recipes/{slug}/comments/{id}"
|
||||
|
||||
def shopping_lists_id(self, id):
|
||||
return f"{self.prefix}/shopping-lists/{id}"
|
||||
|
||||
|
@ -126,7 +132,7 @@ class AppRoutes:
|
|||
return f"{self.prefix}/users/{id}"
|
||||
|
||||
def users_id_favorites(self, id):
|
||||
return f"{self.prefix}/users/{id}/favorites/"
|
||||
return f"{self.prefix}/users/{id}/favorites"
|
||||
|
||||
def users_id_favorites_slug(self, id, slug):
|
||||
return f"{self.prefix}/users/{id}/favorites/{slug}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue