diff options
author | crupest <crupest@outlook.com> | 2020-01-30 23:49:02 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-01-30 23:49:02 +0800 |
commit | 49bd47fb0eb81a88cce135f7ff7c25637790e63b (patch) | |
tree | 70ddc26cf29bdf4b19e9a746cac6017845e009fc /Timeline/Controllers/ControllerAuthExtensions.cs | |
parent | a1a2eede6942aef7d8c20f9e7fb25f53b2b63d86 (diff) | |
download | timeline-49bd47fb0eb81a88cce135f7ff7c25637790e63b.tar.gz timeline-49bd47fb0eb81a88cce135f7ff7c25637790e63b.tar.bz2 timeline-49bd47fb0eb81a88cce135f7ff7c25637790e63b.zip |
Finish reafctor, TODO: Database migration.
Diffstat (limited to 'Timeline/Controllers/ControllerAuthExtensions.cs')
-rw-r--r-- | Timeline/Controllers/ControllerAuthExtensions.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Timeline/Controllers/ControllerAuthExtensions.cs b/Timeline/Controllers/ControllerAuthExtensions.cs index 90da8a93..34fd4d99 100644 --- a/Timeline/Controllers/ControllerAuthExtensions.cs +++ b/Timeline/Controllers/ControllerAuthExtensions.cs @@ -34,7 +34,7 @@ namespace Timeline.Controllers var claim = controller.User.FindFirst(ClaimTypes.NameIdentifier);
if (claim == null)
- throw new InvalidOperationException("Failed to get user id because User has no NameIdentifier claim.");
+ return null;
if (long.TryParse(claim.Value, out var value))
return value;
|