diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-09-25 10:27:49 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-09-25 10:27:49 +0200 |
commit | d0ed765be72f80034fa530ba037e488c35abdd9e (patch) | |
tree | d9138f978d9521bd7f5fb5ec53b37a99abb59159 /api.go | |
parent | 5b246ec86bc3eee768da2347f031b349d1e1553d (diff) | |
download | guichet-d0ed765be72f80034fa530ba037e488c35abdd9e.tar.gz guichet-d0ed765be72f80034fa530ba037e488c35abdd9e.zip |
add a cli feature
Diffstat (limited to 'api.go')
-rw-r--r-- | api.go | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -30,8 +30,7 @@ func checkLoginAPI(w http.ResponseWriter, r *http.Request) (*LoginStatus, error) l := ldapOpen(w) if l == nil { - log.Println(l) - http.Error(w, "Internal server error", http.StatusInternalServerError) + log.Println("Unable to open LDAP connection") return nil, errors.New("Unable to open LDAP connection") } @@ -154,7 +153,7 @@ func handleAPIGarageBucket(w http.ResponseWriter, r *http.Request) { func buildBucketRequest(w http.ResponseWriter, r *http.Request) (*BucketRequest, error) { _, s3key, err := checkLoginAndS3API(w, r) if err != nil { - http.Error(w, "Unable to connect on LDAP", http.StatusUnauthorized) + //http.Error(w, "Unable to connect on LDAP", http.StatusUnauthorized) return nil, err } |