mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 10:21:40 +00:00
feature/implement wss routes (#1196)
* feat(database): create schema for hway and motr * fix(gateway): correct naming inconsistencies in handlers * build: update schema file to be compatible with postgresql syntax * fix: update schema to be compatible with PostgreSQL syntax * chore: update query_hway.sql to follow sqlc syntax * ```text refactor: update query_hway.sql for PostgreSQL and sqlc ``` * feat: add vaults table to store encrypted data * refactor: Update vaults table schema for sqlc compatibility * chore(deps): Upgrade dependencies and add pgx/v5 * refactor(Makefile): move sqlc generate to internal/models * docs(foundations): remove outdated pages * chore(build): add Taskfile for build tasks * refactor(embed): move embed files to internal package * docs: add documentation for Cosmos SDK ORM
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/onsonr/sonr/internal/context"
|
||||
"github.com/onsonr/sonr/internal/database/repository"
|
||||
repository "github.com/onsonr/sonr/internal/models/drivers/hwayorm"
|
||||
)
|
||||
|
||||
func CheckHandleUnique(c echo.Context, handle string) bool {
|
||||
@@ -98,3 +98,28 @@ func DeleteProfile(c echo.Context) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// ╭───────────────────────────────────────────────────────────╮
|
||||
// │ Create Profile (/register/profile) │
|
||||
// ╰───────────────────────────────────────────────────────────╯
|
||||
|
||||
// DefaultCreateProfileParams returns a default CreateProfileParams
|
||||
func DefaultCreateProfileParams() CreateProfileParams {
|
||||
return CreateProfileParams{
|
||||
TurnstileSiteKey: "",
|
||||
FirstNumber: 0,
|
||||
LastNumber: 0,
|
||||
}
|
||||
}
|
||||
|
||||
// CreateProfileParams represents the parameters for creating a profile
|
||||
type CreateProfileParams struct {
|
||||
TurnstileSiteKey string
|
||||
FirstNumber int
|
||||
LastNumber int
|
||||
}
|
||||
|
||||
// Sum returns the sum of the first and last number
|
||||
func (d CreateProfileParams) Sum() int {
|
||||
return d.FirstNumber + d.LastNumber
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user