fixed make file and added an example database

This commit is contained in:
didier.amyot committed 2014-10-30 22:22:47 -07:00
1 parent 32c9730321
commit 4ad71dd240
8 files changed
+62 -76

No files matched your search

+3 -1
View File
@@ -7,6 +7,7 @@ import (
"net/http"
"net/url"
"strconv"
"strings"
"github.com/gorilla/mux"
"gopkg.in/mgo.v2"
@@ -63,9 +64,10 @@ func (this *VultureBackend) GetDataBases() ([]string, error) {
dbs, err := this.Client.DatabaseNames()
if err == nil {
return dbs, nil
} else if err.Error() == "unauthorized" {
} else if strings.Contains(err.Error(), "authorized") {
return this.getDatabaseFromMongoURL()
} else {
fmt.Println(">>> ", err.Error())
return nil, err
}
}