aboutsummaryrefslogtreecommitdiff
path: root/API/Controllers/UserController.cs
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2020-12-11 21:48:49 +0200
committerSyndamia <kamen.d.mladenov@protonmail.com>2020-12-11 21:49:05 +0200
commitd8f253c6710cb23c632d3fc8a31d4d7d1ee0b9ff (patch)
tree5c7d3f970a6ba549bb30160397ae9b7f544a8a71 /API/Controllers/UserController.cs
parentc63b86e74230144c111a380b272a0260e6ed019b (diff)
downloadDevHive-d8f253c6710cb23c632d3fc8a31d4d7d1ee0b9ff.tar
DevHive-d8f253c6710cb23c632d3fc8a31d4d7d1ee0b9ff.tar.gz
DevHive-d8f253c6710cb23c632d3fc8a31d4d7d1ee0b9ff.zip
Authorization key is gotten from appsettings.json (AppSettings/Secret)
Diffstat (limited to 'API/Controllers/UserController.cs')
-rw-r--r--API/Controllers/UserController.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/API/Controllers/UserController.cs b/API/Controllers/UserController.cs
index 187b4e9..eda4a5a 100644
--- a/API/Controllers/UserController.cs
+++ b/API/Controllers/UserController.cs
@@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Mvc;
using Data.Models.DTOs;
using Microsoft.AspNetCore.Authorization;
using Data.Models.Classes;
+using Microsoft.Extensions.Configuration;
namespace API.Controllers
{
@@ -16,9 +17,9 @@ namespace API.Controllers
{
private readonly UserService _service;
- public UserController(DevHiveContext context, IMapper mapper)
+ public UserController(DevHiveContext context, IMapper mapper, IConfiguration configuration)
{
- this._service = new UserService(context, mapper);
+ this._service = new UserService(context, mapper, configuration.GetSection("AppSettings"));
}
[AllowAnonymous]