dashboard/areas/roles/role_service.py

8 lines
179 B
Python

from .models import Role
class RoleService:
@staticmethod
def get_roles():
roles = Role.query.all()
return [{"id": r.id, "name": r.name} for r in roles]