summaryrefslogtreecommitdiff
path: root/internal/api/client/accounts/accounts.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-01-16 17:22:44 +0100
committerLibravatar GitHub <noreply@github.com>2024-01-16 16:22:44 +0000
commitc36f9ac37b8bbdeb4def7a20ba8ea6d6b7ad12d5 (patch)
tree9569c022aaf5c4ceaaf5ce433c95d9d90b6402cc /internal/api/client/accounts/accounts.go
parent[chore] Move to codeberg's exif-terminator (#2536) (diff)
downloadgotosocial-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.go6
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)
}