mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[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
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user