From 55ad6dee716112e1a6c95cd53af0680ab3e8679a Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Sat, 19 Mar 2022 12:01:40 +0100 Subject: [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 --- internal/api/model/admin.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'internal/api/model/admin.go') 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:"-"` +} -- cgit v1.2.3