diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-09-25 15:35:54 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-09-25 15:35:54 +0200 |
commit | c06f52837e5b4aab5335e5a66885c48c24a148a2 (patch) | |
tree | d519f4e53c08e9de2fc3c30606031960c53429fe /directory.go | |
parent | d0ed765be72f80034fa530ba037e488c35abdd9e (diff) | |
download | guichet-c06f52837e5b4aab5335e5a66885c48c24a148a2.tar.gz guichet-c06f52837e5b4aab5335e5a66885c48c24a148a2.zip |
WIP refactor (broken templates)
Diffstat (limited to 'directory.go')
-rw-r--r-- | directory.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/directory.go b/directory.go index 0b5acd5..c7520f9 100644 --- a/directory.go +++ b/directory.go @@ -15,8 +15,8 @@ const FIELD_NAME_DIRECTORY_VISIBILITY = "directoryVisibility" func handleDirectory(w http.ResponseWriter, r *http.Request) { templateDirectory := getTemplate("directory.html") - login := checkLogin(w, r) - if login == nil { + user := RequireUserHtml(w, r) + if user == nil { return } @@ -49,8 +49,8 @@ func handleDirectorySearch(w http.ResponseWriter, r *http.Request) { } //Log to allow the research - login := checkLogin(w, r) - if login == nil { + user := RequireUserHtml(w, r) + if user == nil { http.Error(w, "Login required", http.StatusUnauthorized) return } @@ -69,7 +69,7 @@ func handleDirectorySearch(w http.ResponseWriter, r *http.Request) { }, nil) - sr, err := login.conn.Search(searchRequest) + sr, err := user.Login.conn.Search(searchRequest) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return |