Add flags to UsersSelfSettingsGET

This commit is contained in:
Morgan Bazalgette 2016-12-11 18:38:36 +01:00
parent 099983f7f3
commit e4af28b8ff

View File

@ -115,6 +115,7 @@ type userSettingsResponse struct {
ID int `json:"id"`
Username string `json:"username"`
Email string `json:"email"`
Flags uint `json:"flags"`
userSettingsData
}
@ -129,7 +130,7 @@ SELECT
u.email, s.username_aka, s.favourite_mode,
s.show_custom_badge, s.custom_badge_icon,
s.custom_badge_name, s.can_custom_badge,
s.play_style
s.play_style, u.flags
FROM users u
LEFT JOIN users_stats s ON u.id = s.id
WHERE u.id = ?`, md.ID()).Scan(
@ -137,7 +138,7 @@ WHERE u.id = ?`, md.ID()).Scan(
&r.Email, &r.UsernameAKA, &r.FavouriteMode,
&r.CustomBadge.Show, &r.CustomBadge.Icon,
&r.CustomBadge.Name, &ccb,
&r.PlayStyle,
&r.PlayStyle, &r.Flags,
)
if err != nil {
md.Err(err)