def create_theme(data: SiteTheme, session: Session = Depends(generate_session), current_user=Depends(get_current_user)): """ Creates a site color theme database entry """ db.themes.create(session, data.dict()) return SnackResponse.success("Theme Saved")
def update_theme( id: int, data: SiteTheme, session: Session = Depends(generate_session), current_user=Depends(get_current_user), ): """ Update a theme database entry """ db.themes.update(session, id, data.dict())
def update_theme( theme_name: str, data: SiteTheme, session: Session = Depends(generate_session), current_user=Depends(get_current_user), ): """ Update a theme database entry """ db.themes.update(session, theme_name, data.dict()) return SnackResponse.info(f"Theme Updated: {theme_name}")
def create_theme(data: SiteTheme, session: Session = Depends(generate_session), current_user=Depends(get_current_user)): """ Creates a site color theme database entry """ db.themes.create(session, data.dict())