simplify
Former-commit-id: f8f0efe6986155fb2277b6b471f6387f28a8d8c2 [formerly 33103c80bc2d9ee3e8b4139254d0a3edbfc1721b] [formerly 258653deda36f045230cca84e23e880041b48aba [formerly a3c70f7930a617aa2c44973bf5d073f0e71d44b6]] Former-commit-id: d46ca2362ad160c59b090fa71d1d2bbeb3425cf6 [formerly 51c7941a77cbbdee4ede206edd98981b82a56bba] Former-commit-id: 08fde98df060f53f8f4f7163956c0ce6ef78f434
This commit is contained in:
parent
f7720cb50b
commit
9ef2229835
2 changed files with 3 additions and 3 deletions
|
|
@ -178,8 +178,8 @@ func New(database string, base User) (*FileManager, error) {
|
|||
err = db.Get("config", "commands", &m.Commands)
|
||||
if err != nil && err == storm.ErrNotFound {
|
||||
m.Commands = map[string][]string{
|
||||
"before_save": []string{},
|
||||
"after_save": []string{},
|
||||
"before_save": {},
|
||||
"after_save": {},
|
||||
}
|
||||
err = db.Set("config", "commands", m.Commands)
|
||||
}
|
||||
|
|
|
|||
2
http.go
2
http.go
|
|
@ -187,7 +187,7 @@ func cleanURL(path string) (string, string) {
|
|||
return "", path
|
||||
}
|
||||
|
||||
return path[0:i], path[i:len(path)]
|
||||
return path[0:i], path[i:]
|
||||
}
|
||||
|
||||
// renderFile renders a file using a template with some needed variables.
|
||||
|
|
|
|||
Loading…
Reference in a new issue