Initial commit

This commit is contained in:
Carl Pearson
2025-05-30 05:35:27 -06:00
commit fa7c416f66
16 changed files with 1080 additions and 0 deletions

19
handlers/image.go Normal file
View File

@@ -0,0 +1,19 @@
package handlers
import (
"net/http"
"git.sr.ht/~cwpearson/replicate-jump-server/store"
"github.com/labstack/echo/v4"
)
func ImageGet(c echo.Context) error {
id := c.Param("id")
image, exists := store.Get(id)
if !exists {
return echo.NewHTTPError(http.StatusNotFound, "Image not found or expired")
}
return c.Blob(http.StatusOK, image.ContentType, image.Data)
}