dashboard/areas/roles/role_service.py

9 lines
179 B
Python
Raw Normal View History

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]