mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-14 03:17:27 -06:00
[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:
parent
532c4cc697
commit
55ad6dee71
14 changed files with 649 additions and 2 deletions
|
|
@ -35,6 +35,12 @@ const (
|
|||
DomainBlocksPath = BasePath + "/domain_blocks"
|
||||
// DomainBlocksPathWithID is used for interacting with a single domain block.
|
||||
DomainBlocksPathWithID = DomainBlocksPath + "/:" + IDKey
|
||||
// AccountsPath is used for listing + acting on accounts.
|
||||
AccountsPath = BasePath + "/accounts"
|
||||
// AccountsPathWithID is used for interacting with a single account.
|
||||
AccountsPathWithID = AccountsPath + "/:" + IDKey
|
||||
// AccountsActionPath is used for taking action on a single account.
|
||||
AccountsActionPath = AccountsPathWithID + "/action"
|
||||
|
||||
// ExportQueryKey is for requesting a public export of some data.
|
||||
ExportQueryKey = "export"
|
||||
|
|
@ -63,5 +69,6 @@ func (m *Module) Route(r router.Router) error {
|
|||
r.AttachHandler(http.MethodGet, DomainBlocksPath, m.DomainBlocksGETHandler)
|
||||
r.AttachHandler(http.MethodGet, DomainBlocksPathWithID, m.DomainBlockGETHandler)
|
||||
r.AttachHandler(http.MethodDelete, DomainBlocksPathWithID, m.DomainBlockDELETEHandler)
|
||||
r.AttachHandler(http.MethodPost, AccountsActionPath, m.AccountActionPOSTHandler)
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue