From 073c0b8e90ed196d0cf452423496877b913dd182 Mon Sep 17 00:00:00 2001 From: cyber-dream Date: Fri, 28 Oct 2022 15:27:34 +0300 Subject: [PATCH] refactor session utils and add Json convertor --- sessionUtils/session.go | 5 ----- sessionUtils/sessionUtils.go | 13 +++++++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) delete mode 100644 sessionUtils/session.go create mode 100644 sessionUtils/sessionUtils.go diff --git a/sessionUtils/session.go b/sessionUtils/session.go deleted file mode 100644 index 65df353..0000000 --- a/sessionUtils/session.go +++ /dev/null @@ -1,5 +0,0 @@ -package sessionUtils - -func GetJSSessionInterface(s Session) JSSessionInterface { - return JSSessionInterface{} -} diff --git a/sessionUtils/sessionUtils.go b/sessionUtils/sessionUtils.go new file mode 100644 index 0000000..5d62800 --- /dev/null +++ b/sessionUtils/sessionUtils.go @@ -0,0 +1,13 @@ +package sessionUtils + +import "encoding/json" + +func ConvertServerSessionsToJSON(s Session) []byte { + s_json, err := json.Marshal(s) + _ = err //TODO: Check Errors + return s_json +} + +func GetJSSessionInterface(s Session) JSSessionInterface { + return JSSessionInterface{} +}