diff options
Diffstat (limited to 'tools/image-on-demand/main.go')
-rw-r--r-- | tools/image-on-demand/main.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/image-on-demand/main.go b/tools/image-on-demand/main.go index a3a401d..e2300b6 100644 --- a/tools/image-on-demand/main.go +++ b/tools/image-on-demand/main.go | |||
@@ -117,9 +117,9 @@ func loadList(name string) error { | |||
117 | } | 117 | } |
118 | 118 | ||
119 | if e, ok := files[name][int(id)]; ok { | 119 | if e, ok := files[name][int(id)]; ok { |
120 | files[name][int(id)] = append(e, data[2]) | 120 | files[name][int(id)] = append(e, data[1]) |
121 | } else { | 121 | } else { |
122 | files[name][int(id)] = []string{data[2]} | 122 | files[name][int(id)] = []string{data[1]} |
123 | } | 123 | } |
124 | } | 124 | } |
125 | return nil | 125 | return nil |
@@ -139,5 +139,6 @@ func main() { | |||
139 | 139 | ||
140 | router := httprouter.New() | 140 | router := httprouter.New() |
141 | router.GET("/:type/:image_type/:id", serveImage) | 141 | router.GET("/:type/:image_type/:id", serveImage) |
142 | log.Println("starting image-on-demand on localhost:8081") | ||
142 | log.Fatal(http.ListenAndServe("localhost:8081", router)) | 143 | log.Fatal(http.ListenAndServe("localhost:8081", router)) |
143 | } | 144 | } |