1
0
forked from ScoDoc/ScoDoc

support POST request on ScoDoc7-compat API routes

This commit is contained in:
Emmanuel Viennet 2021-09-10 22:03:52 +02:00
parent 6074cc3892
commit d14ec48602
3 changed files with 24 additions and 10 deletions

View File

@ -1235,7 +1235,9 @@ def listeBilletsEtud(etudid=False, REQUEST=None, format="html"):
return tab.make_page(REQUEST=REQUEST, format=format)
@bp.route("/XMLgetBilletsEtud")
@bp.route(
"/XMLgetBilletsEtud", methods=["GET", "POST"]
) # pour compat anciens clients PHP
@scodoc
@permission_required_compat_scodoc7(Permission.ScoView)
@scodoc7func
@ -1249,7 +1251,7 @@ def XMLgetBilletsEtud(etudid=False, REQUEST=None):
return r
@bp.route("/listeBillets")
@bp.route("/listeBillets", methods=["GET", "POST"]) # pour compat anciens clients PHP
@scodoc
@permission_required_compat_scodoc7(Permission.ScoView)
@scodoc7func
@ -1470,7 +1472,7 @@ def ProcessBilletAbsenceForm(billet_id, REQUEST=None):
# return "OK OK x=" + str(x)
@bp.route("/XMLgetAbsEtud")
@bp.route("/XMLgetAbsEtud", methods=["GET", "POST"]) # pour compat anciens clients PHP
@scodoc
@permission_required_compat_scodoc7(Permission.ScoView)
@scodoc7func

View File

@ -255,7 +255,9 @@ sco_publish(
)
@bp.route("formsemestre_bulletinetud")
@bp.route(
"formsemestre_bulletinetud", methods=["GET", "POST"]
) # pour compat anciens clients PHP
@scodoc
@permission_required_compat_scodoc7(Permission.ScoView)
@scodoc7func
@ -597,7 +599,9 @@ sco_publish("/ue_move", sco_edit_formation.ue_move, Permission.ScoChangeFormatio
# --- Semestres de formation
@bp.route("/formsemestre_list")
@bp.route(
"/formsemestre_list", methods=["GET", "POST"]
) # pour compat anciens clients PHP
@scodoc
@permission_required_compat_scodoc7(Permission.ScoView)
@scodoc7func
@ -623,7 +627,9 @@ def formsemestre_list(
return scu.sendResult(REQUEST, sems, name="formsemestre", format=format)
@bp.route("/XMLgetFormsemestres")
@bp.route(
"/XMLgetFormsemestres", methods=["GET", "POST"]
) # pour compat anciens clients PHP
@scodoc
@permission_required_compat_scodoc7(Permission.ScoView)
@scodoc7func

View File

@ -400,10 +400,16 @@ def search_etud_by_name():
# XMLgetEtudInfos était le nom dans l'ancienne API ScoDoc 6
@bp.route("/etud_info")
@bp.route("/XMLgetEtudInfos")
@bp.route("/Absences/XMLgetEtudInfos") # compat with OLD clients
@bp.route("/Notes/XMLgetEtudInfos")
@bp.route("/etud_info", methods=["GET", "POST"]) # pour compat anciens clients PHP)
@bp.route(
"/XMLgetEtudInfos", methods=["GET", "POST"]
) # pour compat anciens clients PHP)
@bp.route(
"/Absences/XMLgetEtudInfos", methods=["GET", "POST"]
) # pour compat anciens clients PHP
@bp.route(
"/Notes/XMLgetEtudInfos", methods=["GET", "POST"]
) # pour compat anciens clients PHP
@scodoc
@permission_required_compat_scodoc7(Permission.ScoView)
@scodoc7func