mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 10:21:40 +00:00
refactor: reorganize pkl files for better separation of concerns
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
package pages
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
|
||||
"github.com/onsonr/sonr/pkg/nebula/components/grant"
|
||||
"github.com/onsonr/sonr/pkg/nebula/components/home"
|
||||
"github.com/onsonr/sonr/pkg/nebula/components/login"
|
||||
"github.com/onsonr/sonr/pkg/nebula/components/profile"
|
||||
"github.com/onsonr/sonr/pkg/nebula/components/register"
|
||||
"github.com/onsonr/sonr/pkg/nebula/models"
|
||||
)
|
||||
|
||||
func Authorize(c echo.Context) error {
|
||||
return echoResponse(c, grant.View(c))
|
||||
}
|
||||
|
||||
func Home(c echo.Context) error {
|
||||
mdls, err := models.GetModels()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return echoResponse(c, home.View(mdls.Home))
|
||||
}
|
||||
|
||||
func Login(c echo.Context) error {
|
||||
return echoResponse(c, login.Modal(c))
|
||||
}
|
||||
|
||||
func Profile(c echo.Context) error {
|
||||
return echoResponse(c, profile.View(c))
|
||||
}
|
||||
|
||||
func Register(c echo.Context) error {
|
||||
return echoResponse(c, register.Modal(c))
|
||||
}
|
||||
Reference in New Issue
Block a user