diff options
author | 2024-01-16 17:22:44 +0100 | |
---|---|---|
committer | 2024-01-16 16:22:44 +0000 | |
commit | c36f9ac37b8bbdeb4def7a20ba8ea6d6b7ad12d5 (patch) | |
tree | 9569c022aaf5c4ceaaf5ce433c95d9d90b6402cc /internal/api/client/accounts/accounts.go | |
parent | [chore] Move to codeberg's exif-terminator (#2536) (diff) | |
download | gotosocial-c36f9ac37b8bbdeb4def7a20ba8ea6d6b7ad12d5.tar.xz |
[feature] Account alias / move API + db models (#2518)
* [feature] Account alias / move API + db models
* go fmt
* fix little cherry-pick issues
* update error checking, formatting
* add and use new util functions to simplify alias logic
Diffstat (limited to 'internal/api/client/accounts/accounts.go')
-rw-r--r-- | internal/api/client/accounts/accounts.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/api/client/accounts/accounts.go b/internal/api/client/accounts/accounts.go index d57748d46..c94fbfbaa 100644 --- a/internal/api/client/accounts/accounts.go +++ b/internal/api/client/accounts/accounts.go @@ -53,6 +53,8 @@ const ( UnfollowPath = BasePathWithID + "/unfollow" UpdatePath = BasePath + "/update_credentials" VerifyPath = BasePath + "/verify_credentials" + MovePath = BasePath + "/move" + AliasPath = BasePath + "/alias" ) type Module struct { @@ -108,4 +110,8 @@ func (m *Module) Route(attachHandler func(method string, path string, f ...gin.H // search for accounts attachHandler(http.MethodGet, SearchPath, m.AccountSearchGETHandler) attachHandler(http.MethodGet, LookupPath, m.AccountLookupGETHandler) + + // migration handlers + attachHandler(http.MethodPost, AliasPath, m.AccountAliasPOSTHandler) + attachHandler(http.MethodPost, MovePath, m.AccountMovePOSTHandler) } |