summaryrefslogtreecommitdiff
path: root/internal/api/client/accounts/accountupdate.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-04-02 11:42:24 +0200
committerLibravatar GitHub <noreply@github.com>2024-04-02 10:42:24 +0100
commitf05874be3095d3fb3cefd1a92b3c35fe3ae3bf28 (patch)
tree52f1616259b51d0a8a94a786278b9c0aa5ab2298 /internal/api/client/accounts/accountupdate.go
parent[feature] Add `enable` command to mirror existing `disable` command; update d... (diff)
downloadgotosocial-f05874be3095d3fb3cefd1a92b3c35fe3ae3bf28.tar.xz
[feature] Option to hide followers/following (#2788)
Diffstat (limited to 'internal/api/client/accounts/accountupdate.go')
-rw-r--r--internal/api/client/accounts/accountupdate.go16
1 files changed, 15 insertions, 1 deletions
diff --git a/internal/api/client/accounts/accountupdate.go b/internal/api/client/accounts/accountupdate.go
index 905d11479..cd8ee35f4 100644
--- a/internal/api/client/accounts/accountupdate.go
+++ b/internal/api/client/accounts/accountupdate.go
@@ -108,6 +108,14 @@ import (
// description: Default content type to use for authored statuses (text/plain or text/markdown).
// type: string
// -
+// name: theme
+// in: formData
+// description: >-
+// FileName of the theme to use when rendering this account's profile or statuses.
+// The theme must exist on this server, as indicated by /api/v1/accounts/themes.
+// Empty string unsets theme and returns to the default GoToSocial theme.
+// type: string
+// -
// name: custom_css
// in: formData
// description: >-
@@ -120,6 +128,11 @@ import (
// description: Enable RSS feed for this account's Public posts at `/[username]/feed.rss`
// type: boolean
// -
+// name: hide_collections
+// in: formData
+// description: Hide the account's following/followers collections.
+// type: boolean
+// -
// name: fields_attributes[0][name]
// in: formData
// description: Name of 1st profile field to be added to this account's profile.
@@ -311,7 +324,8 @@ func parseUpdateAccountForm(c *gin.Context) (*apimodel.UpdateCredentialsRequest,
form.FieldsAttributes == nil &&
form.Theme == nil &&
form.CustomCSS == nil &&
- form.EnableRSS == nil) {
+ form.EnableRSS == nil &&
+ form.HideCollections == nil) {
return nil, errors.New("empty form submitted")
}