mirror of
https://github.com/optim-enterprises-bv/databunker.git
synced 2025-11-02 10:57:57 +00:00
fix session code
This commit is contained in:
@@ -53,14 +53,14 @@ func (e mainEnv) createSession(w http.ResponseWriter, r *http.Request, ps httpro
|
|||||||
userTOKEN = userBson["token"].(string)
|
userTOKEN = userBson["token"].(string)
|
||||||
event.Record = userTOKEN
|
event.Record = userTOKEN
|
||||||
}
|
}
|
||||||
session, err := e.db.createSessionRecord(session, userTOKEN, expiration, parsedData.jsonData)
|
session, err = e.db.createSessionRecord(session, userTOKEN, expiration, parsedData.jsonData)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
returnError(w, r, "internal error", 405, err, event)
|
returnError(w, r, "internal error", 405, err, event)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||||
w.WriteHeader(200)
|
w.WriteHeader(200)
|
||||||
fmt.Fprintf(w, `{"status":"ok","session":"%s"}`, sessionID)
|
fmt.Fprintf(w, `{"status":"ok","session":"%s"}`, session)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user