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:
@@ -394,7 +394,16 @@ namespace SharpbinV3.Server.Controllers
|
||||
Syntax = p.Syntax,
|
||||
Visibility = p.Visibility,
|
||||
ExpiresAt = p.ExpiresAt,
|
||||
EditedAt = p.EditedAt
|
||||
EditedAt = p.EditedAt,
|
||||
Author = p.User != null && p.User.Visibility == 0 ? new UserSimpleDto
|
||||
{
|
||||
UID = p.User.UID,
|
||||
UUID = p.User.UUID,
|
||||
Username = p.User.Username,
|
||||
DisplayName = p.User.DisplayName,
|
||||
Visibility = p.User.Visibility,
|
||||
Roles = p.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