Get text files from __files__ dir
This commit is contained in:
@@ -29,11 +29,15 @@ func jsonHandler(g storage.Graph) http.Handler {
|
||||
path: "/who/",
|
||||
foo: who,
|
||||
},
|
||||
{
|
||||
path: config.New().FilePrefix,
|
||||
foo: files,
|
||||
},
|
||||
}
|
||||
|
||||
for _, route := range routes {
|
||||
path := route.path
|
||||
nopath := strings.TrimRight(route.path, "/")
|
||||
path := nopath + "/"
|
||||
foo := route.foo
|
||||
mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
|
||||
if err := foo(g, w, r); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user