Assiduite: API routes: fix etudid: int type. Fix #773.

This commit is contained in:
Emmanuel Viennet 2023-10-11 16:37:13 +02:00
parent 164cc3c8b4
commit 18cfd383d8
2 changed files with 36 additions and 30 deletions

View File

@ -84,15 +84,17 @@ def assiduite_justificatifs(assiduite_id: int = None, long: bool = False):
# etudid
@bp.route("/assiduites/<etudid>/count", defaults={"with_query": False})
@api_web_bp.route("/assiduites/<etudid>/count", defaults={"with_query": False})
@bp.route("/assiduites/<etudid>/count/query", defaults={"with_query": True})
@api_web_bp.route("/assiduites/<etudid>/count/query", defaults={"with_query": True})
@bp.route("/assiduites/etudid/<etudid>/count", defaults={"with_query": False})
@api_web_bp.route("/assiduites/etudid/<etudid>/count", defaults={"with_query": False})
@bp.route("/assiduites/etudid/<etudid>/count/query", defaults={"with_query": True})
@bp.route("/assiduites/<int:etudid>/count", defaults={"with_query": False})
@api_web_bp.route("/assiduites/<int:etudid>/count", defaults={"with_query": False})
@bp.route("/assiduites/<int:etudid>/count/query", defaults={"with_query": True})
@api_web_bp.route("/assiduites/<int:etudid>/count/query", defaults={"with_query": True})
@bp.route("/assiduites/etudid/<int:etudid>/count", defaults={"with_query": False})
@api_web_bp.route(
"/assiduites/etudid/<etudid>/count/query", defaults={"with_query": True}
"/assiduites/etudid/<int:etudid>/count", defaults={"with_query": False}
)
@bp.route("/assiduites/etudid/<int:etudid>/count/query", defaults={"with_query": True})
@api_web_bp.route(
"/assiduites/etudid/<int:etudid>/count/query", defaults={"with_query": True}
)
# nip
@bp.route("/assiduites/nip/<nip>/count", defaults={"with_query": False})
@ -183,14 +185,16 @@ def count_assiduites(
# etudid
@bp.route("/assiduites/<etudid>", defaults={"with_query": False})
@api_web_bp.route("/assiduites/<etudid>", defaults={"with_query": False})
@bp.route("/assiduites/<etudid>/query", defaults={"with_query": True})
@api_web_bp.route("/assiduites/<etudid>/query", defaults={"with_query": True})
@bp.route("/assiduites/etudid/<etudid>", defaults={"with_query": False})
@api_web_bp.route("/assiduites/etudid/<etudid>", defaults={"with_query": False})
@bp.route("/assiduites/etudid/<etudid>/query", defaults={"with_query": True})
@api_web_bp.route("/assiduites/etudid/<etudid>/query", defaults={"with_query": True})
@bp.route("/assiduites/<int:etudid>", defaults={"with_query": False})
@api_web_bp.route("/assiduites/<int:etudid>", defaults={"with_query": False})
@bp.route("/assiduites/<int:etudid>/query", defaults={"with_query": True})
@api_web_bp.route("/assiduites/<int:etudid>/query", defaults={"with_query": True})
@bp.route("/assiduites/etudid/<int:etudid>", defaults={"with_query": False})
@api_web_bp.route("/assiduites/etudid/<int:etudid>", defaults={"with_query": False})
@bp.route("/assiduites/etudid/<int:etudid>/query", defaults={"with_query": True})
@api_web_bp.route(
"/assiduites/etudid/<int:etudid>/query", defaults={"with_query": True}
)
# nip
@bp.route("/assiduites/nip/<nip>", defaults={"with_query": False})
@api_web_bp.route("/assiduites/nip/<nip>", defaults={"with_query": False})
@ -437,10 +441,10 @@ def count_assiduites_formsemestre(
# etudid
@bp.route("/assiduite/<etudid>/create", methods=["POST"])
@api_web_bp.route("/assiduite/<etudid>/create", methods=["POST"])
@bp.route("/assiduite/etudid/<etudid>/create", methods=["POST"])
@api_web_bp.route("/assiduite/etudid/<etudid>/create", methods=["POST"])
@bp.route("/assiduite/<int:etudid>/create", methods=["POST"])
@api_web_bp.route("/assiduite/<int:etudid>/create", methods=["POST"])
@bp.route("/assiduite/etudid/<int:etudid>/create", methods=["POST"])
@api_web_bp.route("/assiduite/etudid/<int:etudid>/create", methods=["POST"])
# nip
@bp.route("/assiduite/nip/<nip>/create", methods=["POST"])
@api_web_bp.route("/assiduite/nip/<nip>/create", methods=["POST"])

View File

@ -63,14 +63,16 @@ def justificatif(justif_id: int = None):
# etudid
@bp.route("/justificatifs/<etudid>", defaults={"with_query": False})
@api_web_bp.route("/justificatifs/<etudid>", defaults={"with_query": False})
@bp.route("/justificatifs/<etudid>/query", defaults={"with_query": True})
@api_web_bp.route("/justificatifs/<etudid>/query", defaults={"with_query": True})
@bp.route("/justificatifs/etudid/<etudid>", defaults={"with_query": False})
@api_web_bp.route("/justificatifs/etudid/<etudid>", defaults={"with_query": False})
@bp.route("/justificatifs/etudid/<etudid>/query", defaults={"with_query": True})
@api_web_bp.route("/justificatifs/etudid/<etudid>/query", defaults={"with_query": True})
@bp.route("/justificatifs/<int:etudid>", defaults={"with_query": False})
@api_web_bp.route("/justificatifs/<int:etudid>", defaults={"with_query": False})
@bp.route("/justificatifs/<int:etudid>/query", defaults={"with_query": True})
@api_web_bp.route("/justificatifs/<int:etudid>/query", defaults={"with_query": True})
@bp.route("/justificatifs/etudid/<int:etudid>", defaults={"with_query": False})
@api_web_bp.route("/justificatifs/etudid/<int:etudid>", defaults={"with_query": False})
@bp.route("/justificatifs/etudid/<int:etudid>/query", defaults={"with_query": True})
@api_web_bp.route(
"/justificatifs/etudid/<int:etudid>/query", defaults={"with_query": True}
)
# nip
@bp.route("/justificatifs/nip/<nip>", defaults={"with_query": False})
@api_web_bp.route("/justificatifs/nip/<nip>", defaults={"with_query": False})
@ -230,8 +232,8 @@ def justificatifs_formsemestre(formsemestre_id: int, with_query: bool = False):
@bp.route("/justificatif/<int:etudid>/create", methods=["POST"])
@api_web_bp.route("/justificatif/<int:etudid>/create", methods=["POST"])
@bp.route("/justificatif/etudid/<etudid>/create", methods=["POST"])
@api_web_bp.route("/justificatif/etudid/<etudid>/create", methods=["POST"])
@bp.route("/justificatif/etudid/<int:etudid>/create", methods=["POST"])
@api_web_bp.route("/justificatif/etudid/<int:etudid>/create", methods=["POST"])
# nip
@bp.route("/justificatif/nip/<nip>/create", methods=["POST"])
@api_web_bp.route("/justificatif/nip/<nip>/create", methods=["POST"])