This commit is contained in:
2024-08-08 11:42:52 +09:00

View File

@ -19,7 +19,7 @@ type Authorization struct {
// by authorization provider // by authorization provider
Platform string `bson:"p" json:"p"` Platform string `bson:"p" json:"p"`
Uid string `bson:"u" json:"u"` Uid string `bson:"u" json:"u"`
Email string `bson:"em" json:"em"` Alias string `bson:"al" json:"al"`
} }
func (auth *Authorization) ToStrings() []string { func (auth *Authorization) ToStrings() []string {
@ -27,7 +27,7 @@ func (auth *Authorization) ToStrings() []string {
"a", auth.Account.Hex(), "a", auth.Account.Hex(),
"p", auth.Platform, "p", auth.Platform,
"u", auth.Uid, "u", auth.Uid,
"em", auth.Email, "al", auth.Alias,
"inv", auth.invalidated, "inv", auth.invalidated,
} }
} }
@ -42,7 +42,7 @@ func MakeAuthrizationFromStringMap(src map[string]string) Authorization {
Account: accid, Account: accid,
Platform: src["p"], Platform: src["p"],
Uid: src["u"], Uid: src["u"],
Email: src["em"], Alias: src["al"],
invalidated: src["inv"], invalidated: src["inv"],
} }
} }