personal-website/apps/sunboard/sunboard.go

36 lines
641 B
Go
Raw Normal View History

2023-07-19 01:35:17 +00:00
package sunboard
import (
"net/http"
"personalwebsite/webfilesystem"
"github.com/gin-gonic/gin"
)
type SunboardApp struct {
fs *webfilesystem.WebFileSystem
appID string
}
func NewSunboardApp(webFs *webfilesystem.WebFileSystem) *SunboardApp {
newApp := SunboardApp{
fs: webFs,
appID: "Sunboard",
}
return &newApp
}
func (a *SunboardApp) GetAppID() string {
return a.appID
}
func (a *SunboardApp) PublicRoutes(route *gin.RouterGroup) {
}
func (a *SunboardApp) PrivateRoutes(router *gin.RouterGroup) {
router.POST("render", func(ctx *gin.Context) {
ctx.HTML(http.StatusOK, "sunboard/sunboard.html", gin.H{})
})
}