36 lines
641 B
Go
36 lines
641 B
Go
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{})
|
|
})
|
|
}
|