diff options
author | 2023-09-04 15:55:17 +0200 | |
---|---|---|
committer | 2023-09-04 14:55:17 +0100 | |
commit | 3ed1ca68e52527f74103e1a57ae48ae533508c3a (patch) | |
tree | d6113d71d6f88a3d99bbd2215ead6ca1d4fa6153 /internal/api/model/admin.go | |
parent | [chore]: Bump golang.org/x/image from 0.11.0 to 0.12.0 (#2178) (diff) | |
download | gotosocial-3ed1ca68e52527f74103e1a57ae48ae533508c3a.tar.xz |
[feature] Store admin actions in the db, prevent conflicting actions (#2167)
Diffstat (limited to 'internal/api/model/admin.go')
-rw-r--r-- | internal/api/model/admin.go | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/internal/api/model/admin.go b/internal/api/model/admin.go index 860cb8926..6be3e9cbd 100644 --- a/internal/api/model/admin.go +++ b/internal/api/model/admin.go @@ -163,16 +163,19 @@ type AdminEmoji struct { URI string `json:"uri"` } -// AdminAccountActionRequest models the admin view of an account's details. +// AdminActionRequest models a request +// for an admin action to be performed. // // swagger:ignore -type AdminAccountActionRequest struct { - // Type of the account action. One of disable, silence, suspend. +type AdminActionRequest struct { + // Category of the target entity. + Category string `form:"-" json:"-" xml:"-"` + // Type of admin action to take. 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:"-"` + // ID of the target entity. + TargetID string `form:"-" json:"-" xml:"-"` } // MediaCleanupRequest models admin media cleanup parameters |