aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Web
diff options
context:
space:
mode:
Diffstat (limited to 'src/DevHive.Web')
-rw-r--r--src/DevHive.Web/Configurations/Extensions/ConfigureDatabase.cs2
-rw-r--r--src/DevHive.Web/Controllers/RoleController.cs8
2 files changed, 7 insertions, 3 deletions
diff --git a/src/DevHive.Web/Configurations/Extensions/ConfigureDatabase.cs b/src/DevHive.Web/Configurations/Extensions/ConfigureDatabase.cs
index f877e6c..0bd66a6 100644
--- a/src/DevHive.Web/Configurations/Extensions/ConfigureDatabase.cs
+++ b/src/DevHive.Web/Configurations/Extensions/ConfigureDatabase.cs
@@ -16,7 +16,7 @@ namespace DevHive.Web.Configurations.Extensions
services.AddDbContext<DevHiveContext>(options =>
options.UseNpgsql(configuration.GetConnectionString("DEV")));
- services.AddIdentity<User, IdentityRole>()
+ services.AddIdentity<User, Role>()
.AddEntityFrameworkStores<DevHiveContext>();
services.Configure<IdentityOptions>(options =>
diff --git a/src/DevHive.Web/Controllers/RoleController.cs b/src/DevHive.Web/Controllers/RoleController.cs
index e39d858..5e73357 100644
--- a/src/DevHive.Web/Controllers/RoleController.cs
+++ b/src/DevHive.Web/Controllers/RoleController.cs
@@ -24,7 +24,9 @@ namespace DevHive.Web.Controllers
[HttpPost]
public Task<IActionResult> Create(CreateRoleWebModel createRoleWebModel)
{
- RoleServiceModel roleServiceModel = this._roleMapper.Map<RoleServiceModel>(createRoleWebModel);
+ RoleServiceModel roleServiceModel =
+ this._roleMapper.Map<RoleServiceModel>(createRoleWebModel);
+
return this._service.CreateRole(roleServiceModel);
}
@@ -37,7 +39,9 @@ namespace DevHive.Web.Controllers
[HttpPut]
public Task<IActionResult> Update(UpdateRoleWebModel updateRoleWebModel)
{
- RoleServiceModel roleServiceModel = this._roleMapper.Map<RoleServiceModel>(updateRoleWebModel);
+ RoleServiceModel roleServiceModel =
+ this._roleMapper.Map<RoleServiceModel>(updateRoleWebModel);
+
return this._service.UpdateRole(roleServiceModel);
}