minor stylefixes

This commit is contained in:
rootdarkarchon
2023-01-14 12:54:11 +01:00
parent 8c39f9ce81
commit 9605be8d4a
13 changed files with 81 additions and 80 deletions

View File

@@ -61,7 +61,7 @@ public class JwtController : Controller
_mareDbContext.BannedUsers.Add(new Banned()
{
CharacterIdentification = charaIdent,
Reason = "Autobanned CharacterIdent (" + authResult.Uid + ")"
Reason = "Autobanned CharacterIdent (" + authResult.Uid + ")",
});
await _mareDbContext.SaveChangesAsync();
@@ -75,14 +75,14 @@ public class JwtController : Controller
{
_mareDbContext.BannedRegistrations.Add(new BannedRegistrations()
{
DiscordIdOrLodestoneAuth = lodestone.HashedLodestoneId
DiscordIdOrLodestoneAuth = lodestone.HashedLodestoneId,
});
}
if (!_mareDbContext.BannedRegistrations.Any(c => c.DiscordIdOrLodestoneAuth == lodestone.DiscordId.ToString()))
{
_mareDbContext.BannedRegistrations.Add(new BannedRegistrations()
{
DiscordIdOrLodestoneAuth = lodestone.DiscordId.ToString()
DiscordIdOrLodestoneAuth = lodestone.DiscordId.ToString(),
});
}
@@ -98,7 +98,7 @@ public class JwtController : Controller
var token = CreateToken(new List<Claim>()
{
new Claim(MareClaimTypes.Uid, authResult.Uid),
new Claim(MareClaimTypes.CharaIdent, charaIdent)
new Claim(MareClaimTypes.CharaIdent, charaIdent),
});
return Content(token.RawData);
@@ -111,7 +111,7 @@ public class JwtController : Controller
var token = new SecurityTokenDescriptor()
{
Subject = new ClaimsIdentity(authClaims),
SigningCredentials = new SigningCredentials(authSigningKey, SecurityAlgorithms.HmacSha256Signature)
SigningCredentials = new SigningCredentials(authSigningKey, SecurityAlgorithms.HmacSha256Signature),
};
var handler = new JwtSecurityTokenHandler();