Merge remote-tracking branch 'origin/main'

# Conflicts:
#	sessionUtils/sessionTypes.go
This commit is contained in:
cyber-dream 2022-10-28 17:22:29 +03:00
commit dfb6be1fba
3 changed files with 23 additions and 5 deletions

View File

@ -1,5 +1,9 @@
package gameUtils
import (
"encoding/json"
)
func FindGameByID(id string, list Games) SteamGame {
for _, game := range list.SteamGames {
if game.GameId == id {
@ -29,3 +33,9 @@ func GetJSGameInterface(game SteamGame) JSGameInterface {
}
return newInterface
}
func ConvertServerGamesToJSON(g Games) []byte {
g_json, err := json.Marshal(g)
_ = err //TODO: Check Errors
return g_json
}

View File

@ -1,5 +0,0 @@
package sessionUtils
func GetJSSessionInterface(s Session) JSSessionInterface {
return JSSessionInterface{}
}

View File

@ -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{}
}