aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Services/Services
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2020-12-17 19:42:45 +0200
committertranstrike <transtrike@gmail.com>2020-12-17 19:42:45 +0200
commit875857f118d0364a94eb88bf03673e1d0165c23c (patch)
tree10f17608f9188be7162c130396ebaecae188eeb7 /src/DevHive.Services/Services
parent33a1a5899a16378691cd62d9ee4644db2a02e2b7 (diff)
downloadDevHive-875857f118d0364a94eb88bf03673e1d0165c23c.tar
DevHive-875857f118d0364a94eb88bf03673e1d0165c23c.tar.gz
DevHive-875857f118d0364a94eb88bf03673e1d0165c23c.zip
Fixed namespaces
Diffstat (limited to 'src/DevHive.Services/Services')
-rw-r--r--src/DevHive.Services/Services/RoleService.cs10
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!");