Files
lash/internal/app/routes.go
vxclutch 71ffad466b save
2026-05-27 08:30:51 -04:00

30 lines
429 B
Go

package app
import (
"lash"
"lash/internal/errx"
"lash/internal/handlers"
"net/http"
)
func New() http.Handler {
mux := http.NewServeMux()
fp, err := GetFilePath()
if err != nil {
errx.FatalPerror(err)
}
share := handlers.ShareData{
Version: lash.Version,
FileName: fp,
}
file := handlers.FileData{}
mux.HandleFunc("/", share.Handler)
mux.HandleFunc("/api/receive-token", file.APIHandler)
return mux
}