forked from ebhomengo/niki
16 lines
398 B
Go
16 lines
398 B
Go
package service
|
|
|
|
import (
|
|
"context"
|
|
richerror "git.gocasts.ir/ebhomengo/niki/pkg/rich_error"
|
|
)
|
|
|
|
func (a Authorization) AssignRoleToStaff(ctx context.Context, req AssignRoleToStaffRequest) error {
|
|
const op = "service.authorization.assign_role_to_staff"
|
|
|
|
if err := a.roleRepo.AssignRoleToStaff(ctx, req.StaffID, req.RolesID); err != nil {
|
|
return richerror.New(op).WithErr(err)
|
|
}
|
|
return nil
|
|
}
|