[feature] Store admin actions in the db, prevent conflicting actions (#2167)

This commit is contained in:
tobi
2023-09-04 15:55:17 +02:00
committed by GitHub
parent 4f3daeebcb
commit 3ed1ca68e5
23 changed files with 1393 additions and 272 deletions

View File

@ -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