fix bug in session code

This commit is contained in:
root
2020-11-24 22:42:32 +00:00
parent 889b10b8f4
commit 7a2d4c2033

View File

@@ -53,12 +53,7 @@ func (e mainEnv) createSession(w http.ResponseWriter, r *http.Request, ps httpro
userTOKEN = userBson["token"].(string)
event.Record = userTOKEN
}
sessionUUID, err := uuid.GenerateUUID()
if err != nil {
returnError(w, r, "internal error", 405, err, event)
return
}
sessionID, err := e.db.createSessionRecord(sessionUUID, userTOKEN, expiration, parsedData.jsonData)
session, err := e.db.createSessionRecord(session, userTOKEN, expiration, parsedData.jsonData)
if err != nil {
returnError(w, r, "internal error", 405, err, event)
return