Merge remote-tracking branch 'origin/Feature/program-manager/move' into Feature/program-manager/move
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using GozareshgirProgramManager.Application._Common.Models;
|
||||
using GozareshgirProgramManager.Application.Modules.Roles.Commands.CreateRole;
|
||||
using GozareshgirProgramManager.Application.Modules.Roles.Commands.EditRole;
|
||||
using MediatR;
|
||||
using Shared.Contracts.PmRole.Commands;
|
||||
|
||||
@@ -25,4 +26,16 @@ public class PmRoleCommandService: IPmRoleCommandService
|
||||
var res = await _mediator.Send(request);
|
||||
return (res.IsSuccess, res.ErrorMessage);
|
||||
}
|
||||
|
||||
public async Task<(bool, string)> Edit(CreatePmRoleDto command)
|
||||
{
|
||||
var request = new EditRoleCommand
|
||||
{
|
||||
RoleName = command.RoleName,
|
||||
Permissions = command.Permissions,
|
||||
GozareshgirRoleId = command.GozareshgirRoleId
|
||||
};
|
||||
var res = await _mediator.Send(request);
|
||||
return (res.IsSuccess, res.ErrorMessage);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user