mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-14 17:17:30 -06:00
[feature] Admin accounts endpoints; approve/reject sign-ups (#2826)
* update settings panels, add pending overview + approve/deny functions * add admin accounts get, approve, reject * send approved/rejected emails * use signup URL * docs! * email * swagger * web linting * fix email tests * wee lil fixerinos * use new paging logic for GetAccounts() series of admin endpoints, small changes to query building * shuffle useAccountIDIn check *before* adding to query * fix parse from toot react error * use `netip.Addr` * put valid slices in globals * optimistic updates for account state --------- Co-authored-by: kim <grufwub@gmail.com>
This commit is contained in:
parent
1439042104
commit
89e0cfd874
74 changed files with 4102 additions and 545 deletions
|
|
@ -39,9 +39,12 @@ const (
|
|||
HeaderAllowsPathWithID = HeaderAllowsPath + "/:" + IDKey
|
||||
HeaderBlocksPath = BasePath + "/header_blocks"
|
||||
HeaderBlocksPathWithID = HeaderBlocksPath + "/:" + IDKey
|
||||
AccountsPath = BasePath + "/accounts"
|
||||
AccountsPathWithID = AccountsPath + "/:" + IDKey
|
||||
AccountsV1Path = BasePath + "/accounts"
|
||||
AccountsV2Path = "/v2/admin/accounts"
|
||||
AccountsPathWithID = AccountsV1Path + "/:" + IDKey
|
||||
AccountsActionPath = AccountsPathWithID + "/action"
|
||||
AccountsApprovePath = AccountsPathWithID + "/approve"
|
||||
AccountsRejectPath = AccountsPathWithID + "/reject"
|
||||
MediaCleanupPath = BasePath + "/media_cleanup"
|
||||
MediaRefetchPath = BasePath + "/media_refetch"
|
||||
ReportsPath = BasePath + "/reports"
|
||||
|
|
@ -113,7 +116,12 @@ func (m *Module) Route(attachHandler func(method string, path string, f ...gin.H
|
|||
attachHandler(http.MethodPost, DomainKeysExpirePath, m.DomainKeysExpirePOSTHandler)
|
||||
|
||||
// accounts stuff
|
||||
attachHandler(http.MethodGet, AccountsV1Path, m.AccountsGETV1Handler)
|
||||
attachHandler(http.MethodGet, AccountsV2Path, m.AccountsGETV2Handler)
|
||||
attachHandler(http.MethodGet, AccountsPathWithID, m.AccountGETHandler)
|
||||
attachHandler(http.MethodPost, AccountsActionPath, m.AccountActionPOSTHandler)
|
||||
attachHandler(http.MethodPost, AccountsApprovePath, m.AccountApprovePOSTHandler)
|
||||
attachHandler(http.MethodPost, AccountsRejectPath, m.AccountRejectPOSTHandler)
|
||||
|
||||
// media stuff
|
||||
attachHandler(http.MethodPost, MediaCleanupPath, m.MediaCleanupPOSTHandler)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue