1.0 version

This commit is contained in:
vxclutch
2026-05-27 19:00:09 -04:00
parent 7ee19a2883
commit 1234288e03
6 changed files with 70 additions and 24 deletions

View File

@@ -5,6 +5,7 @@ import (
"lash/internal/errx"
"lash/internal/handlers"
"net/http"
"os"
)
func New() http.Handler {
@@ -15,12 +16,19 @@ func New() http.Handler {
errx.FatalPerror(err)
}
share := handlers.ShareData{
Version: lash.Version,
FileName: fp,
contents, err := os.ReadFile(fp)
if err != nil {
errx.FatalPerror(err)
}
file := handlers.FileData{}
share := handlers.ShareData{
Version: lash.Version,
}
file := handlers.FileData{
Contents: contents,
FileName: fp,
}
mux.HandleFunc("/", share.Handler)
mux.HandleFunc("/api/receive-token", file.APIHandler)