Skip to content

Commit

Permalink
feat: record user email and name
Browse files Browse the repository at this point in the history
  • Loading branch information
xfoxfu committed Sep 20, 2024
1 parent 1996db8 commit 83f57e8
Show file tree
Hide file tree
Showing 6 changed files with 629 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Net.Vatprc.Uniapi/Controllers/AuthController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,12 @@ public async Task<IActionResult> VatsimCallback(string code, string? state)
user = new()
{
Cid = vatsimUser.Data.Cid,
FullName = vatsimUser.Data.Cid
};
DbContext.User.Add(user);
await DbContext.SaveChangesAsync();
}
user.FullName = vatsimUser.Data.Personal.FullName;
user.Email = vatsimUser.Data.Personal.Email;
await DbContext.SaveChangesAsync();

if (Request.Cookies.TryGetValue("redirect", out var redirect)
&& !string.IsNullOrEmpty(redirect)
Expand Down
Loading

0 comments on commit 83f57e8

Please sign in to comment.