put the ad (quote) banners in - last major feature in MISSINGFUNCS
This commit is contained in:
@@ -34,6 +34,9 @@ import (
|
||||
//go:embed static_images/*
|
||||
var static_images embed.FS
|
||||
|
||||
//go:embed adbanners/*
|
||||
var ad_banners embed.FS
|
||||
|
||||
// Constants for default photo sizes.
|
||||
const (
|
||||
UserPhotoWidth = 100
|
||||
@@ -71,6 +74,12 @@ func AmServeImage(c echo.Context) error {
|
||||
if err == nil {
|
||||
return c.Blob(http.StatusOK, mimeTypeFromFilename(components[3]), b)
|
||||
}
|
||||
case "ads/":
|
||||
var b []byte
|
||||
b, err = ad_banners.ReadFile(filepath.Join("adbanners", components[3]))
|
||||
if err == nil {
|
||||
return c.Blob(http.StatusOK, mimeTypeFromFilename(components[3]), b)
|
||||
}
|
||||
case "store/":
|
||||
var id int
|
||||
id, err = strconv.Atoi(components[3])
|
||||
|
||||
Reference in New Issue
Block a user