mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-05 02:41:41 +00:00
feat: add start-tui command for interactive mode
This commit is contained in:
@@ -8,14 +8,11 @@ import (
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/onsonr/sonr/crypto/mpc"
|
||||
"github.com/onsonr/sonr/pkg/common/response"
|
||||
"golang.org/x/exp/rand"
|
||||
)
|
||||
|
||||
func HandleCreateProfile(c echo.Context) error {
|
||||
dat := CreateProfileData{
|
||||
FirstNumber: 1,
|
||||
LastNumber: 2,
|
||||
}
|
||||
return response.TemplEcho(c, ProfileFormView(dat))
|
||||
return response.TemplEcho(c, ProfileFormView(randomCreateProfileData()))
|
||||
}
|
||||
|
||||
func HandlePasskeyStart(c echo.Context) error {
|
||||
@@ -50,3 +47,10 @@ func HandlePasskeyFinish(c echo.Context) error {
|
||||
}
|
||||
return response.TemplEcho(c, LoadingVaultView())
|
||||
}
|
||||
|
||||
func randomCreateProfileData() CreateProfileData {
|
||||
return CreateProfileData{
|
||||
FirstNumber: rand.Intn(5) + 1,
|
||||
LastNumber: rand.Intn(4) + 1,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user