aboutsummaryrefslogtreecommitdiff
path: root/Backend/Api
diff options
context:
space:
mode:
authorJelena Petrovic <jelenapetrovic.7119@gmail.com>2022-11-21 06:58:25 +0100
committerJelena Petrovic <jelenapetrovic.7119@gmail.com>2022-11-21 06:58:25 +0100
commit045d19f46a9a79971ab9b72cad62a6b0e27bac89 (patch)
treebfa45cd6fd60d5c768a41305ccc401fd8e03bef2 /Backend/Api
parentf7a12cb67dd4d9e041534a04633d633582f6e0a2 (diff)
omogucena komunikacija preko soketa (slanje i primanje poruka), pisanje poruka u sqllite bazu na telefonu, dodate minimalno odradjene komponente neophodne za pregled i slanje poruka #37
Diffstat (limited to 'Backend/Api')
-rw-r--r--Backend/Api/Api/Controllers/UserController.cs2
-rw-r--r--Backend/Api/Api/Services/ChatHub.cs2
2 files changed, 2 insertions, 2 deletions
diff --git a/Backend/Api/Api/Controllers/UserController.cs b/Backend/Api/Api/Controllers/UserController.cs
index 1bc395f..dd081cb 100644
--- a/Backend/Api/Api/Controllers/UserController.cs
+++ b/Backend/Api/Api/Controllers/UserController.cs
@@ -55,7 +55,7 @@ namespace Api.Controllers
return Ok(rez);
return BadRequest();
}
- [HttpGet("{id}/profile")]
+ [HttpGet("{id}/id/profile")]
[Authorize(Roles = "User")]
public async Task<ActionResult<UserSend>> GetUserById(string id)
{
diff --git a/Backend/Api/Api/Services/ChatHub.cs b/Backend/Api/Api/Services/ChatHub.cs
index e0bf5df..639a585 100644
--- a/Backend/Api/Api/Services/ChatHub.cs
+++ b/Backend/Api/Api/Services/ChatHub.cs
@@ -13,7 +13,7 @@ namespace Api.Services
}
public override async Task OnConnectedAsync()
{
- string token = Context.GetHttpContext().Request.Query["access_token"];
+ string token = Context.GetHttpContext().Request.Headers["access_token"];
if (token == null)
return;
string id = _jwtService.TokenToId(token);