diff options
author | 2022-03-15 16:12:35 +0100 | |
---|---|---|
committer | 2022-03-15 16:12:35 +0100 | |
commit | 532c4cc6978a7fe707373106eebade237c89693a (patch) | |
tree | 937bf0a44ef2a8d8d366786693decf2c65b20db5 /internal/api/client/account/account.go | |
parent | [performance] Add dereference shortcuts to avoid making http calls to self (#... (diff) | |
download | gotosocial-532c4cc6978a7fe707373106eebade237c89693a.tar.xz |
[feature] Federate local account deletion (#431)
* add account delete to API
* model account delete request
* add AccountDeleteLocal
* federate local account deletes
* add DeleteLocal
* update transport (controller) to allow shortcuts
* delete logic + testing
* update swagger docs
* more tests + fixes
Diffstat (limited to 'internal/api/client/account/account.go')
-rw-r--r-- | internal/api/client/account/account.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/api/client/account/account.go b/internal/api/client/account/account.go index c72e9fb5d..c38a8cfb4 100644 --- a/internal/api/client/account/account.go +++ b/internal/api/client/account/account.go @@ -71,6 +71,8 @@ const ( BlockPath = BasePathWithID + "/block" // UnblockPath is for removing a block of an account UnblockPath = BasePathWithID + "/unblock" + // DeleteAccountPath is for deleting one's account via the API + DeleteAccountPath = BasePath + "/delete" ) // Module implements the ClientAPIModule interface for account-related actions @@ -90,6 +92,9 @@ func (m *Module) Route(r router.Router) error { // create account r.AttachHandler(http.MethodPost, BasePath, m.AccountCreatePOSTHandler) + // delete account + r.AttachHandler(http.MethodPost, DeleteAccountPath, m.AccountDeletePOSTHandler) + // get account r.AttachHandler(http.MethodGet, BasePathWithID, m.muxHandler) |