From 7620880b919d92e901464f95d9afb6501c91b9e2 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 17 Jul 2024 15:04:51 +0200 Subject: [PATCH] API logos: noms fonctions pour la doc --- app/api/logos.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/api/logos.py b/app/api/logos.py index 319e258cd..1ec747a11 100644 --- a/app/api/logos.py +++ b/app/api/logos.py @@ -49,7 +49,7 @@ from app.scodoc.sco_utils import json_error @scodoc @permission_required(Permission.ScoSuperAdmin) @as_json -def api_get_glob_logos(): +def logo_list_globals(): """Liste tous les logos""" logos = list_logos()[None] return list(logos.keys()) @@ -58,7 +58,7 @@ def api_get_glob_logos(): @bp.route("/logo/") @scodoc @permission_required(Permission.ScoSuperAdmin) -def api_get_glob_logo(logoname): +def logo_get_global(logoname): logo = find_logo(logoname=logoname) if logo is None: return json_error(404, message="logo not found") @@ -79,7 +79,7 @@ def _core_get_logos(dept_id) -> list: @scodoc @permission_required(Permission.ScoSuperAdmin) @as_json -def api_get_local_logos_by_acronym(departement): +def logo_get_local_by_acronym(departement): dept_id = Departement.from_acronym(departement).id return _core_get_logos(dept_id) @@ -88,7 +88,7 @@ def api_get_local_logos_by_acronym(departement): @scodoc @permission_required(Permission.ScoSuperAdmin) @as_json -def api_get_local_logos_by_id(dept_id): +def logo_get_local_by_id(dept_id): return _core_get_logos(dept_id) @@ -107,7 +107,7 @@ def _core_get_logo(dept_id, logoname) -> Response: @bp.route("/departement//logo/") @scodoc @permission_required(Permission.ScoSuperAdmin) -def api_get_local_logo_dept_by_acronym(departement, logoname): +def logo_get_local_dept_by_acronym(departement, logoname): dept_id = Departement.from_acronym(departement).id return _core_get_logo(dept_id, logoname) @@ -115,5 +115,5 @@ def api_get_local_logo_dept_by_acronym(departement, logoname): @bp.route("/departement/id//logo/") @scodoc @permission_required(Permission.ScoSuperAdmin) -def api_get_local_logo_dept_by_id(dept_id, logoname): +def logo_get_local_dept_by_id(dept_id, logoname): return _core_get_logo(dept_id, logoname)