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:
@ -96,6 +96,9 @@ type Account struct {
|
||||
// Role of the account on this instance.
|
||||
// Omitted for remote accounts.
|
||||
Role *AccountRole `json:"role,omitempty"`
|
||||
// If set, indicates that this account is currently inactive, and has migrated to the given account.
|
||||
// Omitted for accounts that haven't moved, and for suspended accounts.
|
||||
Moved *Account `json:"moved,omitempty"`
|
||||
}
|
||||
|
||||
// AccountCreateRequest models account creation parameters.
|
||||
@ -213,6 +216,23 @@ type AccountDeleteRequest struct {
|
||||
Password string `form:"password" json:"password" xml:"password"`
|
||||
}
|
||||
|
||||
// AccountMoveRequest models a request to Move an account.
|
||||
//
|
||||
// swagger:ignore
|
||||
type AccountMoveRequest struct {
|
||||
// Password of the account's user, for confirmation.
|
||||
Password string `form:"password" json:"password" xml:"password"`
|
||||
// ActivityPub URI of the account that's being moved to.
|
||||
MovedToURI string `form:"moved_to_uri" json:"moved_to_uri" xml:"moved_to_uri"`
|
||||
}
|
||||
|
||||
// AccountAliasRequest models a request
|
||||
// to set an account's alsoKnownAs URIs.
|
||||
type AccountAliasRequest struct {
|
||||
// ActivityPub URIs of any accounts that this one is being aliased to.
|
||||
AlsoKnownAsURIs []string `form:"also_known_as_uris" json:"also_known_as_uris" xml:"also_known_as_uris"`
|
||||
}
|
||||
|
||||
// AccountRole models the role of an account.
|
||||
//
|
||||
// swagger:model accountRole
|
||||
|
Reference in New Issue
Block a user