add func find session by id
This commit is contained in:
parent
672d491e60
commit
83ea88a3ab
@ -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
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user