summaryrefslogtreecommitdiff
path: root/internal/api/model
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-03-19 12:01:40 +0100
committerLibravatar GitHub <noreply@github.com>2022-03-19 12:01:40 +0100
commit55ad6dee716112e1a6c95cd53af0680ab3e8679a (patch)
tree37fe44052801ca3178a9a1c19a0a1ddddbbda96d /internal/api/model
parent[feature] Federate local account deletion (#431) (diff)
downloadgotosocial-55ad6dee716112e1a6c95cd53af0680ab3e8679a.tar.xz
[feature] Admin account actions (#432)
* add accountAction to the admin API * model admin account action * add admin account action to the processor * add migration for new AdminAccountActions table * fix accounts admin path * Update swagger docs
Diffstat (limited to 'internal/api/model')
-rw-r--r--internal/api/model/admin.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/api/model/admin.go b/internal/api/model/admin.go
index 9bf1f6d8d..ada415546 100644
--- a/internal/api/model/admin.go
+++ b/internal/api/model/admin.go
@@ -79,3 +79,15 @@ type AdminReportInfo struct {
// Statuses attached to the report, for context.
Statuses []Status `json:"statuses"`
}
+
+// AdminAccountActionRequest models the admin view of an account's details.
+//
+// swagger:ignore
+type AdminAccountActionRequest struct {
+ // Type of the account action. One of disable, silence, suspend.
+ Type string `form:"type" json:"type" xml:"type"`
+ // Text describing why an action was taken.
+ Text string `form:"text" json:"text" xml:"text"`
+ // ID of the account to be acted on.
+ TargetAccountID string `form:"-" json:"-" xml:"-"`
+}