diff options
| author | transtrike <transtrike@gmail.com> | 2020-12-17 19:42:45 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2020-12-17 19:42:45 +0200 |
| commit | 875857f118d0364a94eb88bf03673e1d0165c23c (patch) | |
| tree | 10f17608f9188be7162c130396ebaecae188eeb7 /src/DevHive.Services/Services/RoleService.cs | |
| parent | 33a1a5899a16378691cd62d9ee4644db2a02e2b7 (diff) | |
| download | DevHive-875857f118d0364a94eb88bf03673e1d0165c23c.tar DevHive-875857f118d0364a94eb88bf03673e1d0165c23c.tar.gz DevHive-875857f118d0364a94eb88bf03673e1d0165c23c.zip | |
Fixed namespaces
Diffstat (limited to 'src/DevHive.Services/Services/RoleService.cs')
| -rw-r--r-- | src/DevHive.Services/Services/RoleService.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/DevHive.Services/Services/RoleService.cs b/src/DevHive.Services/Services/RoleService.cs index d5c1848..c0b9062 100644 --- a/src/DevHive.Services/Services/RoleService.cs +++ b/src/DevHive.Services/Services/RoleService.cs @@ -1,9 +1,9 @@ using System; using System.Threading.Tasks; using AutoMapper; +using DevHive.Common.Models.Identity; using DevHive.Data.Models; using DevHive.Data.Repositories; -using DevHive.Services.Models.Identity.Role; namespace DevHive.Services.Services { @@ -18,7 +18,7 @@ namespace DevHive.Services.Services this._roleMapper = mapper; } - public async Task<bool> CreateRole(RoleServiceModel roleServiceModel) + public async Task<bool> CreateRole(RoleModel roleServiceModel) { if (await this._roleRepository.DoesNameExist(roleServiceModel.Name)) throw new ArgumentException("Role already exists!"); @@ -28,15 +28,15 @@ namespace DevHive.Services.Services return await this._roleRepository.AddAsync(role); } - public async Task<RoleServiceModel> GetRoleById(Guid id) + public async Task<RoleModel> GetRoleById(Guid id) { Role role = await this._roleRepository.GetByIdAsync(id) ?? throw new ArgumentException("Role does not exist!"); - return this._roleMapper.Map<RoleServiceModel>(role); + return this._roleMapper.Map<RoleModel>(role); } - public async Task<bool> UpdateRole(RoleServiceModel roleServiceModel) + public async Task<bool> UpdateRole(RoleModel roleServiceModel) { if (!await this._roleRepository.DoesRoleExist(roleServiceModel.Id)) throw new ArgumentException("Role does not exist!"); |
