diff options
Diffstat (limited to 'src/DevHive.Services/Services/RoleService.cs')
| -rw-r--r-- | src/DevHive.Services/Services/RoleService.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/DevHive.Services/Services/RoleService.cs b/src/DevHive.Services/Services/RoleService.cs index b3e734d..c04bf31 100644 --- a/src/DevHive.Services/Services/RoleService.cs +++ b/src/DevHive.Services/Services/RoleService.cs @@ -21,8 +21,8 @@ namespace DevHive.Services.Services public async Task<IActionResult> CreateRole(RoleServiceModel roleServiceModel) { - if (!await this._roleRepository.DoesNameExist(roleServiceModel.Name)) - return new BadRequestObjectResult("Invalid role name!"); + if (await this._roleRepository.DoesNameExist(roleServiceModel.Name)) + return new BadRequestObjectResult("Role already exists!"); Role role = this._roleMapper.Map<Role>(roleServiceModel); |
