mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
fix: include author data in recent paste data
This commit is contained in:
@@ -53,13 +53,13 @@ namespace SharpbinV3.Server.Services
|
||||
|
||||
var totpEnabled = await _db.UserTotps.AnyAsync(t => t.UserUUID == user.UUID);
|
||||
var claims = new List<Claim>
|
||||
{
|
||||
new("uuid", user.UUID.ToString()),
|
||||
new("username", user.Username),
|
||||
new("displayname", user.DisplayName ?? ""),
|
||||
new("totp_enabled", totpEnabled.ToString()),
|
||||
new(JwtRegisteredClaimNames.Jti, Guid.NewGuid().ToString())
|
||||
};
|
||||
{
|
||||
new("uuid", user.UUID.ToString()),
|
||||
new("username", user.Username),
|
||||
new("displayname", user.DisplayName ?? ""),
|
||||
new("totp_enabled", totpEnabled.ToString()),
|
||||
new(JwtRegisteredClaimNames.Jti, Guid.NewGuid().ToString())
|
||||
};
|
||||
|
||||
if (user.Roles != null)
|
||||
{
|
||||
|
||||
@@ -126,6 +126,7 @@ namespace SharpbinV3.Server.Services
|
||||
.OrderByDescending(p => p.PID)
|
||||
.Skip(offset)
|
||||
.Take(count)
|
||||
.Include(p => p.User)
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user