[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
This commit is contained in:
tobi
2022-03-19 12:01:40 +01:00
committed by GitHub
parent 532c4cc697
commit 55ad6dee71
14 changed files with 649 additions and 2 deletions

View File

@ -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:"-"`
}