From 962ed0cf717b70b8ce65181d6690f443b7d79d25 Mon Sep 17 00:00:00 2001 From: mklee Date: Tue, 19 Aug 2025 05:52:40 +0900 Subject: [PATCH] =?UTF-8?q?=EC=83=9D=EC=84=B1=EC=9D=BC=EC=8B=9C=20?= =?UTF-8?q?=EC=A0=84=EB=8B=AC=ED=95=98=EB=8A=94=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- session/common.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/session/common.go b/session/common.go index 957f44f..745d979 100644 --- a/session/common.go +++ b/session/common.go @@ -24,12 +24,14 @@ type Authorization struct { } func (auth *Authorization) ToStrings() []string { + ct, _ := auth.CreatedTime.MarshalJSON() return []string{ "a", auth.Account.Hex(), "p", auth.Platform, "u", auth.Uid, "al", auth.Alias, "inv", auth.invalidated, + "ct", string(ct), } } @@ -39,12 +41,15 @@ func (auth *Authorization) Valid() bool { func MakeAuthrizationFromStringMap(src map[string]string) Authorization { accid, _ := primitive.ObjectIDFromHex(src["a"]) + var datetime primitive.DateTime + datetime.UnmarshalJSON([]byte(src["ct"])) return Authorization{ Account: accid, Platform: src["p"], Uid: src["u"], Alias: src["al"], invalidated: src["inv"], + CreatedTime: datetime, } }