add func find session by id

This commit is contained in:
cyber-dream 2022-11-04 03:03:31 +03:00
parent 672d491e60
commit 83ea88a3ab

View File

@ -34,3 +34,13 @@ var FakeSessions = Sessions{
}, },
}, },
} }
func FindSessionByID(sessionId string, sessions []Session) Session {
for _, session := range sessions {
if session.SessionId == sessionId {
return session
}
}
var temp Session = Session{}
return temp
}