1
Fork 0
photoview/api/routes/images.go

19 lines
320 B
Go
Raw Normal View History

2020-02-09 12:53:21 +01:00
package routes
import (
"fmt"
"net/http"
"github.com/go-chi/chi"
)
func ImageRoutes() chi.Router {
router := chi.NewRouter()
router.Get("/{name}", func(w http.ResponseWriter, r *http.Request) {
image_name := chi.URLParam(r, "name")
w.Write([]byte(fmt.Sprintf("Image: %s", image_name)))
})
return router
}