// Code scaffolded by goctl. Safe to edit.
// goctl 1.10.1

package permission

import (
	"net/http"

	"gateway/internal/logic/permission"
	"gateway/internal/response"
	"gateway/internal/svc"
)

// 列出租戶內所有角色（含 system role）
func ListRolesHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		l := permission.NewListRolesLogic(actorContext(r.Context(), r), svcCtx)
		data, err := l.ListRoles()
		response.Write(r.Context(), w, data, err)
	}
}
