Website Summary Files Commits Branches @commit @diff @stats
path: root / API / Controllers / UserController.cs
diff options
context:
space:
mode:
Commitd8f253c6710cb23c632d3fc8a31d4d7d1ee0b9ff (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2020-12-11 21:48:49 +0200
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2020-12-11 21:49:05 +0200
Files5c7d3f970a6ba549bb30160397ae9b7f544a8a71 /API/Controllers/UserController.cs
DevHive-d8f253c6710cb23c632d3fc8a31d4d7d1ee0b9ff.tar
DevHive-d8f253c6710cb23c632d3fc8a31d4d7d1ee0b9ff.tar.gz
DevHive-d8f253c6710cb23c632d3fc8a31d4d7d1ee0b9ff.zip
Parentc63b86e74230144c111a380b272a0260e6ed019b (diff)
Authorization key is gotten from appsettings.json (AppSettings/Secret)
1 files changed, 3 insertions, 2 deletions
-rw-r--r--API/Controllers/UserController.cs5
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]