diff options
| author | 2021-07-08 15:05:19 +0200 | |
|---|---|---|
| committer | 2021-07-08 15:05:19 +0200 | |
| commit | fe269cd64148cda67cc958d3c3c62f3858bfdc90 (patch) | |
| tree | d3a7f007314339aa6c2beffc8267b15795990219 /internal/api/client | |
| parent | disable html escaping for short description (#84) (diff) | |
| download | gotosocial-fe269cd64148cda67cc958d3c3c62f3858bfdc90.tar.xz | |
fix up some of the instance patching stuff (#85)
Diffstat (limited to 'internal/api/client')
| -rw-r--r-- | internal/api/client/instance/instancepatch.go | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/internal/api/client/instance/instancepatch.go b/internal/api/client/instance/instancepatch.go index 250e836be..1080574c4 100644 --- a/internal/api/client/instance/instancepatch.go +++ b/internal/api/client/instance/instancepatch.go @@ -25,7 +25,7 @@ func (m *Module) InstanceUpdatePATCHHandler(c *gin.Context) {  		return  	} -	l.Debugf("parsing request form %s", c.Request.Form) +	l.Debug("parsing request form")  	form := &model.InstanceSettingsUpdateRequest{}  	if err := c.ShouldBind(&form); err != nil || form == nil {  		l.Debugf("could not parse form from request: %s", err) @@ -33,8 +33,10 @@ func (m *Module) InstanceUpdatePATCHHandler(c *gin.Context) {  		return  	} +	l.Debugf("parsed form: %+v", form) +  	// if everything on the form is nil, then nothing has been set and we shouldn't continue -	if form.SiteTitle == nil && form.SiteContactUsername == nil && form.SiteContactEmail == nil && form.SiteShortDescription == nil && form.SiteDescription == nil && form.SiteTerms == nil && form.Avatar == nil && form.Header == nil { +	if form.Title == nil && form.ContactUsername == nil && form.ContactEmail == nil && form.ShortDescription == nil && form.Description == nil && form.Terms == nil && form.Avatar == nil && form.Header == nil {  		l.Debugf("could not parse form from request")  		c.JSON(http.StatusBadRequest, gin.H{"error": "empty form submitted"})  		return | 
