fix (#114): let nuage set default configuration

This commit is contained in:
Mickael KERJEAN 2018-11-15 13:02:28 +11:00
parent 3fbdb9fd86
commit e3a9d09094
2 changed files with 7 additions and 27 deletions

View file

@ -1,33 +1,13 @@
{
"general": {
"port": 8334,
"host": "https://nuage.kerjean.me",
"secret_key": "",
"editor": "emacs",
"fork_button": true,
"display_hidden": false,
"client_search_enable": true,
"client_search_per_min": 20,
"auto_connect": false
},
"features": {
},
"log": {
"enable": true,
"level": "INFO",
"telemetry": true
},
"smtp": {
"addr": "smtp.gmail.com",
"username": "mickael.kerjean@gmail.com",
"password": "test"
"email": {
},
"oauth": {
"gdrive": {
"client_id": "",
"client_secret": ""
},
"dropbox": {
"client_id": ""
}
},
"connections": [
{

View file

@ -35,8 +35,8 @@ func init() {
c.Get("oauth").Default("")
// Features
c.Get("feature.share.enable").Default(true)
c.Get("feature.search.enable").Default(true)
c.Get("features.share.enable").Default(true)
c.Get("features.search.enable").Default(true)
// Log
@ -196,8 +196,8 @@ func (this Config) Export() (string, error) {
Name: this.Get("general.name").String(),
RememberMe: this.Get("general.remember_me").Bool(),
Connections: this.Get("connections").Interface(),
EnableSearch: this.Get("feature.search.enable").Bool(),
EnableShare: this.Get("geature.share.enable").Bool(),
EnableSearch: this.Get("features.search.enable").Bool(),
EnableShare: this.Get("features.share.enable").Bool(),
MimeTypes: AllMimeTypes(),
}
j, err := json.Marshal(publicConf)