Add /preview/* routes
This commit is contained in:
@@ -116,6 +116,13 @@ func (u User) MaxTimestampDiffHours() int {
|
||||
return 24
|
||||
}
|
||||
|
||||
func (u User) JSONPreview() UserPreviewJSON {
|
||||
return UserPreviewJSON{
|
||||
UserID: u.UserID,
|
||||
Username: u.Username,
|
||||
}
|
||||
}
|
||||
|
||||
type UserJSON struct {
|
||||
UserID UserID `json:"user_id"`
|
||||
Username *string `json:"username"`
|
||||
@@ -137,6 +144,11 @@ type UserJSON struct {
|
||||
MaxUserMessageIDLength int `json:"max_user_message_id_length"`
|
||||
}
|
||||
|
||||
type UserPreviewJSON struct {
|
||||
UserID UserID `json:"user_id"`
|
||||
Username *string `json:"username"`
|
||||
}
|
||||
|
||||
type UserJSONWithClientsAndKeys struct {
|
||||
UserJSON
|
||||
Clients []ClientJSON `json:"clients"`
|
||||
|
||||
Reference in New Issue
Block a user