mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-02 02:03:20 -05:00
* feat: ✨ * fix colors * add additional support for settings meal tag * add defaults to recipe * use group reciep settings * fix login infinite loading * disable owner on initial load * add skeleton loader * add v-model support * formatting * fix overwriting existing values * feat(frontend): ✨ add markdown preview for steps * update black plus formatting * update help text * fix overwrite error * remove print Co-authored-by: hay-kot <hay-kot@pm.me>
28 lines
790 B
Python
28 lines
790 B
Python
from typing import List, Optional
|
|
|
|
from fastapi import APIRouter, Depends
|
|
|
|
from mealie.core.dependencies import get_admin_user, get_current_user
|
|
|
|
|
|
class AdminAPIRouter(APIRouter):
|
|
"""Router for functions to be protected behind admin authentication"""
|
|
|
|
def __init__(
|
|
self,
|
|
tags: Optional[List[str]] = None,
|
|
prefix: str = "",
|
|
):
|
|
super().__init__(tags=tags, prefix=prefix, dependencies=[Depends(get_admin_user)])
|
|
|
|
|
|
class UserAPIRouter(APIRouter):
|
|
"""Router for functions to be protected behind user authentication"""
|
|
|
|
def __init__(
|
|
self,
|
|
tags: Optional[List[str]] = None,
|
|
prefix: str = "",
|
|
):
|
|
super().__init__(tags=tags, prefix=prefix, dependencies=[Depends(get_current_user)])
|