From c36f9ac37b8bbdeb4def7a20ba8ea6d6b7ad12d5 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Tue, 16 Jan 2024 17:22:44 +0100 Subject: [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 --- internal/api/client/accounts/accounts.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'internal/api/client/accounts/accounts.go') 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) } -- cgit v1.2.3