Supprime set_groups (mal spécifiée)
This commit is contained in:
parent
ca1fe679db
commit
b6de8f8631
@ -92,30 +92,3 @@ def etud_in_group(group_id: int, etat=None):
|
|||||||
)
|
)
|
||||||
|
|
||||||
return jsonify([etud.to_dict_short() for etud in query])
|
return jsonify([etud.to_dict_short() for etud in query])
|
||||||
|
|
||||||
|
|
||||||
@bp.route(
|
|
||||||
"/partitions/set_groups/partition/<int:partition_id>/groups/<string:groups_id>/delete/<string:groups_to_delete>"
|
|
||||||
"/create/<string:groups_to_create>",
|
|
||||||
methods=["POST"],
|
|
||||||
)
|
|
||||||
@token_auth.login_required
|
|
||||||
@token_permission_required(Permission.APIEtudChangeGroups)
|
|
||||||
def set_groups(
|
|
||||||
partition_id: int, groups_lists: str, groups_to_delete: str, groups_to_create: str
|
|
||||||
):
|
|
||||||
"""
|
|
||||||
Set les groups
|
|
||||||
|
|
||||||
partition_id : l'id d'une partition
|
|
||||||
groups_lists : membres de chaque groupe existant
|
|
||||||
groups_ti_delete : les groupes à supprimer
|
|
||||||
groups_to_create : les groupes à créer
|
|
||||||
"""
|
|
||||||
# Fonction utilisée : app.scodoc.sco_groups.setGroups()
|
|
||||||
try:
|
|
||||||
# Utilisation de la fonction setGroups
|
|
||||||
setGroups(partition_id, groups_lists, groups_to_create, groups_to_delete)
|
|
||||||
return error_response(200, message="Groups set")
|
|
||||||
except ValueError:
|
|
||||||
return error_response(404, message="Erreur")
|
|
||||||
|
Loading…
Reference in New Issue
Block a user