mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02: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:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user