aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorMrArmonius <mrarmonius@gmail.com>2021-07-26 16:54:51 +0200
committerAlex Auvolat <alex@adnab.me>2021-08-16 12:54:08 +0200
commitcf4918e901da8f2c388eebd33a500bf737943685 (patch)
tree63492edb25cc0a5a01a317744efce85a6015a4a2 /main.go
parent819d7bf02f1c7b119468c1353b78a3d3bb7015fe (diff)
downloadguichet-cf4918e901da8f2c388eebd33a500bf737943685.tar.gz
guichet-cf4918e901da8f2c388eebd33a500bf737943685.zip
Add MessageID for asynchronous request
ID is stored in the session with the type `uint32` Correction javascript For the `for loop`, we need don't forget than know we have in format `JSON` the response: `search:{..}, id:0` For the id, don't forget to change the global value of `JS`.
Diffstat (limited to 'main.go')
-rw-r--r--main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.go b/main.go
index 6059d04..da75ce0 100644
--- a/main.go
+++ b/main.go
@@ -392,6 +392,9 @@ func handleLogin(w http.ResponseWriter, r *http.Request) *LoginInfo {
session.Values["login_password"] = password
session.Values["login_dn"] = user_dn
+ //Add Value MessageID
+ session.Values["MessageID"] = uint32(0)
+
err = session.Save(r, w)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)