package api import ( "net/http" "github.com/gin-gonic/gin" ) var photoIconSvg = []byte(` `) var videoIconSvg = []byte(` `) var albumIconSvg = []byte(` `) var labelIconSvg = []byte(` `) var brokenIconSvg = []byte(` `) var uncachedIconSvg = []byte(` `) // GET /api/v1/svg/* func GetSvg(router *gin.RouterGroup) { router.GET("/svg/photo", func(c *gin.Context) { c.Data(http.StatusOK, "image/svg+xml", photoIconSvg) }) router.GET("/svg/video", func(c *gin.Context) { c.Data(http.StatusOK, "image/svg+xml", videoIconSvg) }) router.GET("/svg/label", func(c *gin.Context) { c.Data(http.StatusOK, "image/svg+xml", labelIconSvg) }) router.GET("/svg/album", func(c *gin.Context) { c.Data(http.StatusOK, "image/svg+xml", albumIconSvg) }) router.GET("/svg/folder", func(c *gin.Context) { c.Data(http.StatusOK, "image/svg+xml", albumIconSvg) }) router.GET("/svg/broken", func(c *gin.Context) { c.Data(http.StatusOK, "image/svg+xml", brokenIconSvg) }) router.GET("/svg/uncached", func(c *gin.Context) { c.Data(http.StatusOK, "image/svg+xml", uncachedIconSvg) }) }