mirror of
https://github.com/lone-cloud/prism
synced 2026-06-03 08:43:10 -07:00
23 lines
388 B
Go
23 lines
388 B
Go
package telegram
|
|
|
|
import (
|
|
"embed"
|
|
"net/http"
|
|
|
|
"github.com/go-chi/chi/v5"
|
|
)
|
|
|
|
//go:embed templates/*.html
|
|
var templates embed.FS
|
|
|
|
func GetTemplates() embed.FS {
|
|
return templates
|
|
}
|
|
|
|
func RegisterRoutes(router *chi.Mux, handlers *Handlers, auth func(http.Handler) http.Handler) {
|
|
if handlers == nil {
|
|
return
|
|
}
|
|
|
|
router.With(auth).Get("/fragment/telegram", handlers.HandleFragment)
|
|
}
|