aboutsummaryrefslogtreecommitdiff
path: root/Backend/Api
diff options
context:
space:
mode:
Diffstat (limited to 'Backend/Api')
-rw-r--r--Backend/Api/Api/Controllers/appController.cs5
-rw-r--r--Backend/Api/Api/appsettings.json2
2 files changed, 5 insertions, 2 deletions
diff --git a/Backend/Api/Api/Controllers/appController.cs b/Backend/Api/Api/Controllers/appController.cs
index f16cf29..ed83231 100644
--- a/Backend/Api/Api/Controllers/appController.cs
+++ b/Backend/Api/Api/Controllers/appController.cs
@@ -2,6 +2,8 @@
using System.Data;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
+using Api.Interfaces;
+using Api.Services;
namespace Api.Controllers
{
@@ -21,7 +23,8 @@ namespace Api.Controllers
string truePassword = _configuration.GetSection("AppSettings:AppPassword").Value;
if (appPath == null || !System.IO.File.Exists(appPath))
return BadRequest("Aplikacija ne postoji");
- if (password == null || password!=truePassword)
+
+ if (password == null || !UserService.checkPassword(password,truePassword))
return BadRequest("Pogresna sifra");
return File(System.IO.File.ReadAllBytes(appPath), "application/octet-stream", Path.GetFileName(appPath));
}
diff --git a/Backend/Api/Api/appsettings.json b/Backend/Api/Api/appsettings.json
index d212dda..a3ef323 100644
--- a/Backend/Api/Api/appsettings.json
+++ b/Backend/Api/Api/appsettings.json
@@ -4,7 +4,7 @@
"EmailToken": "e8X8c0lm9KS7itWi3wgE6BiPXR21WPvO",
"MapQuestApiKey": "47oeviBUoCI2JxWzNARmCtrH9fDp5Mtk", //msbs#556ASDFGGSGSD
"AppName": "app-debug.apk",
- "AppPassword": "jabukakruska123"
+ "AppPassword": "$2a$10$fq/JWx7ZZ8wVAgwwrS6O9OMtkD7QsAil7ugjE6c0mM1RTTU92bZ/C"
},
"Logging": {