mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 10:21:40 +00:00
refactor: rename buf-publish.yml to publish-assets.yml
This commit is contained in:
@@ -11,6 +11,9 @@ import (
|
||||
//go:embed assets
|
||||
var embeddedFiles embed.FS
|
||||
|
||||
//go:embed assets/config.pkl
|
||||
var config []byte
|
||||
|
||||
func getHTTPFS() (http.FileSystem, error) {
|
||||
fsys, err := fs.Sub(embeddedFiles, "assets")
|
||||
if err != nil {
|
||||
@@ -30,3 +33,8 @@ func UseAssets(e *echo.Echo) error {
|
||||
e.GET("/assets/*", echo.WrapHandler(http.StripPrefix("/assets/", assets)))
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetConfig is a middleware that serves the config file
|
||||
func GetConfig(e echo.Context) error {
|
||||
return e.Blob(http.StatusOK, "application/octet-stream", config)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user