Allererste Fassung von Gruppen- und Dispatcher-Mobil View
This commit is contained in:
1 parent
47240302d0
commit
8e5f91948f
9 files changed
+1383
-20
No files matched your search
@@ -11,6 +11,18 @@ from cmbnet.utils.helpers import log_transaction
|
||||
api_groups_bp = Blueprint('api_groups', __name__)
|
||||
|
||||
|
||||
@api_groups_bp.route('/groups/me')
|
||||
@role_required(['Gruppe'])
|
||||
def get_my_group(**kwargs):
|
||||
from cmbnet.services.groups_service import GroupsService
|
||||
groups = GroupsService.get_all(g.tenant_id)
|
||||
account_id = g.current_account['id']
|
||||
for group in groups.values():
|
||||
if group.get('account_id') == account_id:
|
||||
return jsonify(group)
|
||||
return jsonify({'error': 'Gruppe nicht gefunden'}), 404
|
||||
|
||||
|
||||
@api_groups_bp.route('/groups/<int:group_id>/alias', methods=['POST'])
|
||||
@role_required(['Dispatcher', 'Administrator'])
|
||||
def update_group_alias(group_id, **kwargs):
|
||||
|
||||
Reference in new issue
Block a user