Skip to content

Commit

Permalink
Return the channel age required in the error
Browse files Browse the repository at this point in the history
  • Loading branch information
miko committed Oct 17, 2024
1 parent 6b852ea commit 475bec5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/services/v1/comments/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ func checkSettings(settings *m.CreatorSetting, request *createRequest) error {
return errors.Err(err)
}
if time.Since(request.commenterChannel.CreatedAt) < time.Duration(settings.TimeSinceFirstComment.Int64)*time.Minute {
return api.StatusError{Err: errors.Err("this creator has set minimum account age requirements that are not currently met"), Status: http.StatusBadRequest}
return api.StatusError{Err: errors.Err(fmt.Sprintf("this creator has set minimum account age requirements that are not currently met: %d minutes", settings.TimeSinceFirstComment.Int64)), Status: http.StatusBadRequest}
}
}
return nil
Expand Down

0 comments on commit 475bec5

Please sign in to comment.