diff options
| author | ivar <i@oiee.no> | 2024-04-28 22:37:48 +0200 |
|---|---|---|
| committer | ivar <i@oiee.no> | 2024-04-28 22:37:48 +0200 |
| commit | f356f15d3a7dce1669944d23ab395ec96d042293 (patch) | |
| tree | 03a82934ec802e2579daa45f748e959dc6598847 /code/api/src/Endpoints/Internal/Account/GetAccountRoute.cs | |
| parent | f99db65435f2cac81b5b48eb117991f4acd66a7e (diff) | |
| download | greatoffice-f356f15d3a7dce1669944d23ab395ec96d042293.tar.xz greatoffice-f356f15d3a7dce1669944d23ab395ec96d042293.zip | |
Misc
Diffstat (limited to 'code/api/src/Endpoints/Internal/Account/GetAccountRoute.cs')
| -rw-r--r-- | code/api/src/Endpoints/Internal/Account/GetAccountRoute.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/code/api/src/Endpoints/Internal/Account/GetAccountRoute.cs b/code/api/src/Endpoints/Internal/Account/GetAccountRoute.cs index 121b40f..67c4d4d 100644 --- a/code/api/src/Endpoints/Internal/Account/GetAccountRoute.cs +++ b/code/api/src/Endpoints/Internal/Account/GetAccountRoute.cs @@ -12,7 +12,7 @@ public class GetAccountRoute : RouteBaseAsync.WithoutRequest.WithActionResult<Lo public override async Task<ActionResult<LoggedInUserModel>> HandleAsync(CancellationToken cancellationToken = default) { var user = _database.Users .Select(x => new {x.Username, x.Id}) - .SingleOrDefault(c => c.Id == LoggedInUser.Id); + .FirstOrDefault(c => c.Id == LoggedInUser.Id); if (user != default) { return Ok(new LoggedInUserModel { Id = LoggedInUser.Id, @@ -23,4 +23,4 @@ public class GetAccountRoute : RouteBaseAsync.WithoutRequest.WithActionResult<Lo await HttpContext.SignOutAsync(); return Unauthorized(); } -}
\ No newline at end of file +} |
