Removed unused functions in the Flask API file.
This commit is contained in:
parent
01a0031cf4
commit
ce7d092be4
1 changed files with 0 additions and 13 deletions
|
|
@ -41,19 +41,6 @@ def _json_error(e: Exception, status: int = 400):
|
||||||
def _bool_param(d: dict[str, str], key: str, default: bool) -> bool:
|
def _bool_param(d: dict[str, str], key: str, default: bool) -> bool:
|
||||||
return _is_truthy(d.get(key, "1" if default else "0"))
|
return _is_truthy(d.get(key, "1" if default else "0"))
|
||||||
|
|
||||||
|
|
||||||
def _safe_int(value: str | None, default: int) -> int:
|
|
||||||
try:
|
|
||||||
return int(value) if value is not None else default
|
|
||||||
except Exception:
|
|
||||||
return default
|
|
||||||
|
|
||||||
|
|
||||||
def _link_with_params(base_url: str, **params) -> str:
|
|
||||||
q = {k: v for k, v in params.items() if v is not None}
|
|
||||||
return f"{base_url}?{urlencode(q)}"
|
|
||||||
|
|
||||||
|
|
||||||
def generate_crud_blueprint(model, service, *, base_prefix: str | None = None, rest: bool = True, rpc: bool = True):
|
def generate_crud_blueprint(model, service, *, base_prefix: str | None = None, rest: bool = True, rpc: bool = True):
|
||||||
"""
|
"""
|
||||||
REST:
|
REST:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue