Don't allow email to be modified from user settings
This commit is contained in:
parent
1c2201317f
commit
6d3d6cde2d
|
@ -45,7 +45,6 @@ func UsersSelfFavouriteModeGET(md common.MethodData) common.CodeMessager {
|
||||||
}
|
}
|
||||||
|
|
||||||
type userSettingsData struct {
|
type userSettingsData struct {
|
||||||
Email string `json:"email"`
|
|
||||||
UsernameAKA string `json:"username_aka"`
|
UsernameAKA string `json:"username_aka"`
|
||||||
FavouriteMode *int `json:"favourite_mode"`
|
FavouriteMode *int `json:"favourite_mode"`
|
||||||
CustomBadge struct {
|
CustomBadge struct {
|
||||||
|
@ -60,7 +59,6 @@ func UsersSelfSettingsPOST(md common.MethodData) common.CodeMessager {
|
||||||
var d userSettingsData
|
var d userSettingsData
|
||||||
md.RequestData.Unmarshal(&d)
|
md.RequestData.Unmarshal(&d)
|
||||||
q := new(common.UpdateQuery).
|
q := new(common.UpdateQuery).
|
||||||
Add("u.email", d.Email).
|
|
||||||
Add("s.username_aka", d.UsernameAKA).
|
Add("s.username_aka", d.UsernameAKA).
|
||||||
Add("s.favourite_mode", d.FavouriteMode).
|
Add("s.favourite_mode", d.FavouriteMode).
|
||||||
Add("s.custom_badge_name", d.CustomBadge.Name).
|
Add("s.custom_badge_name", d.CustomBadge.Name).
|
||||||
|
|
Loading…
Reference in New Issue
Block a user