account state changes
This commit is contained in:
@@ -17,6 +17,9 @@ func (a *SiteAPI) contactRequest(r *http.Request) http.HandlerFunc {
|
||||
return response.BadRequest(a.logger, a.Name(), "invalid_payload", "Failed to decode contact request payload")
|
||||
}
|
||||
request.Normalize()
|
||||
if request.Topic == "" {
|
||||
request.Topic = model.ContactRequestTopicSiteContact
|
||||
}
|
||||
if err := request.Validate(); err != nil {
|
||||
a.logger.Warn("Contact request validation failed", zap.Error(err))
|
||||
return response.BadPayload(a.logger, a.Name(), err)
|
||||
|
||||
Reference in New Issue
Block a user