diff options
| author | transtrike <transtrike@gmail.com> | 2021-01-19 19:02:37 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2021-01-19 19:02:37 +0200 |
| commit | 163827d4a8dbc4b41bfa0f78edc7dd30626e95d3 (patch) | |
| tree | 511aedb06c346671d6604e861c0b13cf93ae9299 /src/DevHive.Services/Services | |
| parent | 4836e2f4cc3e1eb53f415d26771c76c84d29c280 (diff) | |
| download | DevHive-163827d4a8dbc4b41bfa0f78edc7dd30626e95d3.tar DevHive-163827d4a8dbc4b41bfa0f78edc7dd30626e95d3.tar.gz DevHive-163827d4a8dbc4b41bfa0f78edc7dd30626e95d3.zip | |
Fixed role id creeping up the chain
Diffstat (limited to 'src/DevHive.Services/Services')
| -rw-r--r-- | src/DevHive.Services/Services/RoleService.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/DevHive.Services/Services/RoleService.cs b/src/DevHive.Services/Services/RoleService.cs index 0945624..3ebb7c8 100644 --- a/src/DevHive.Services/Services/RoleService.cs +++ b/src/DevHive.Services/Services/RoleService.cs @@ -47,15 +47,15 @@ namespace DevHive.Services.Services return this._roleMapper.Map<RoleServiceModel>(role); } - public async Task<bool> UpdateRole(RoleServiceModel roleServiceModel) + public async Task<bool> UpdateRole(UpdateRoleServiceModel updateRoleServiceModel) { - if (!await this._roleRepository.DoesRoleExist(roleServiceModel.Id)) + if (!await this._roleRepository.DoesRoleExist(updateRoleServiceModel.Id)) throw new ArgumentException("Role does not exist!"); - if (await this._roleRepository.DoesNameExist(roleServiceModel.Name)) + if (await this._roleRepository.DoesNameExist(updateRoleServiceModel.Name)) throw new ArgumentException("Role name already exists!"); - Role role = this._roleMapper.Map<Role>(roleServiceModel); + Role role = this._roleMapper.Map<Role>(updateRoleServiceModel); return await this._roleRepository.EditAsync(role); } |
