aboutsummaryrefslogtreecommitdiff
path: root/api.go
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2023-09-25 10:27:49 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2023-09-25 10:27:49 +0200
commitd0ed765be72f80034fa530ba037e488c35abdd9e (patch)
treed9138f978d9521bd7f5fb5ec53b37a99abb59159 /api.go
parent5b246ec86bc3eee768da2347f031b349d1e1553d (diff)
downloadguichet-d0ed765be72f80034fa530ba037e488c35abdd9e.tar.gz
guichet-d0ed765be72f80034fa530ba037e488c35abdd9e.zip
add a cli feature
Diffstat (limited to 'api.go')
-rw-r--r--api.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/api.go b/api.go
index 1ddb4ea..6bff15d 100644
--- a/api.go
+++ b/api.go
@@ -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
}