MSP-8976 Add application_group field and filter

This commit is contained in:
Иван Перлов committed 2026-11-20 17:19:38 +03:00
1 parent 67e9b563b4
commit 7589203719
9 files changed
+317 -65

No files matched your search

+4 -3
View File
@@ -12,7 +12,7 @@ import (
)
type roleService interface {
All(ctx context.Context) ([]domain.Role, error)
All(ctx context.Context, req domain.RoleAllRequest) ([]domain.Role, error)
Create(ctx context.Context, req domain.CreateRoleRequest, adminId int64) (*domain.Role, error)
Update(ctx context.Context, req domain.UpdateRoleRequest, adminId int64) (*domain.Role, error)
Delete(ctx context.Context, req domain.DeleteRoleRequest, adminId int64) error
@@ -35,12 +35,13 @@ func NewRole(roleService roleService) Role {
// @Accept json
// @Produce json
// @Param X-AUTH-ADMIN header string true "Токен администратора"
// @Param body body domain.RoleAllRequest true "Тело запроса"
// @Success 200 {array} domain.Role
// @Failure 400 {object} domain.GrpcError
// @Failure 500 {object} domain.GrpcError
// @Router /role/all [POST]
func (u Role) All(ctx context.Context) ([]domain.Role, error) {
users, err := u.roleService.All(ctx)
func (u Role) All(ctx context.Context, req domain.RoleAllRequest) ([]domain.Role, error) {
users, err := u.roleService.All(ctx, req)
if err != nil {
return nil, errors.WithMessage(err, "get roles")
}