~stephen-stewart/snapweb/client-side-filtering-and-ordering

« back to all changes in this revision

Viewing changes to cmd/snappyd/handlers.go

  • Committer: Snappy Tarmac
  • Author(s): Sergio Schvezov
  • Date: 2015-04-29 14:50:53 UTC
  • mfrom: (84.6.13 icons)
  • Revision ID: snappy_tarmac-20150429145053-olbqcqlo2ra5aesu
Adding icon support by sergiusens approved by sergiusens

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
        http.Handle("/public/", loggingHandler(http.FileServer(http.Dir("./www"))))
93
93
        http.Handle("/mock-api/", loggingHandler(http.FileServer(http.Dir("./www"))))
94
94
 
95
 
        if iconDir, err := click.IconDir(); err == nil {
96
 
                http.Handle("/icons/", loggingHandler(http.FileServer(http.Dir(filepath.Join(iconDir, "..")))))
 
95
        if iconDir, relativePath, err := snappy.IconDir(); err == nil {
 
96
                http.Handle(fmt.Sprintf("/%s/", relativePath), loggingHandler(http.FileServer(http.Dir(filepath.Join(iconDir, "..")))))
97
97
        } else {
98
98
                log.Println("Issues while getting icon dir:", err)
99
99
        }