Merge remote-tracking branch 'origin/Feature/program-manager/move' into Feature/program-manager/move

This commit is contained in:
2025-12-13 18:56:04 +03:30
3 changed files with 18 additions and 8 deletions

View File

@@ -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);
}
}