diff options
| 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 |
| commit | d8f253c6710cb23c632d3fc8a31d4d7d1ee0b9ff (patch) | |
| tree | 5c7d3f970a6ba549bb30160397ae9b7f544a8a71 /API/Controllers | |
| parent | c63b86e74230144c111a380b272a0260e6ed019b (diff) | |
| download | DevHive-d8f253c6710cb23c632d3fc8a31d4d7d1ee0b9ff.tar DevHive-d8f253c6710cb23c632d3fc8a31d4d7d1ee0b9ff.tar.gz DevHive-d8f253c6710cb23c632d3fc8a31d4d7d1ee0b9ff.zip | |
Authorization key is gotten from appsettings.json (AppSettings/Secret)
Diffstat (limited to 'API/Controllers')
| -rw-r--r-- | API/Controllers/UserController.cs | 5 |
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] |
