Remove twitter notification configuration (#2598)
This commit is contained in:
committed by
GitHub
parent
392da72c8b
commit
59e5cfefd4
@@ -58,28 +58,3 @@ func SetBrowserNotificationConfiguration(w http.ResponseWriter, r *http.Request)
|
||||
|
||||
controllers.WriteSimpleResponse(w, true, "updated browser push config with provided values")
|
||||
}
|
||||
|
||||
// SetTwitterConfiguration will set the browser notification configuration.
|
||||
func SetTwitterConfiguration(w http.ResponseWriter, r *http.Request) {
|
||||
if !requirePOST(w, r) {
|
||||
return
|
||||
}
|
||||
|
||||
type request struct {
|
||||
Value models.TwitterConfiguration `json:"value"`
|
||||
}
|
||||
|
||||
decoder := json.NewDecoder(r.Body)
|
||||
var config request
|
||||
if err := decoder.Decode(&config); err != nil {
|
||||
controllers.WriteSimpleResponse(w, false, "unable to update twitter config with provided values")
|
||||
return
|
||||
}
|
||||
|
||||
if err := data.SetTwitterConfiguration(config.Value); err != nil {
|
||||
controllers.WriteSimpleResponse(w, false, "unable to update twitter config with provided values")
|
||||
return
|
||||
}
|
||||
|
||||
controllers.WriteSimpleResponse(w, true, "updated twitter config with provided values")
|
||||
}
|
||||
|
||||
@@ -84,7 +84,6 @@ func GetServerConfig(w http.ResponseWriter, r *http.Request) {
|
||||
Notifications: notificationsConfigResponse{
|
||||
Discord: data.GetDiscordConfig(),
|
||||
Browser: data.GetBrowserPushConfig(),
|
||||
Twitter: data.GetTwitterConfiguration(),
|
||||
},
|
||||
}
|
||||
|
||||
@@ -160,5 +159,4 @@ type federationConfigResponse struct {
|
||||
type notificationsConfigResponse struct {
|
||||
Browser models.BrowserNotificationConfiguration `json:"browser"`
|
||||
Discord models.DiscordConfiguration `json:"discord"`
|
||||
Twitter models.TwitterConfiguration `json:"twitter"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user