mirror of
https://github.com/cf-sonr/hway.git
synced 2026-01-12 03:09:14 +00:00
fix: correct profile ID type to string in database and models
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
|
||||
"github.com/golang-jwt/jwt"
|
||||
"github.com/ipfs/go-cid"
|
||||
"github.com/onsonr/crypto/keys"
|
||||
"github.com/onsonr/crypto/ucan"
|
||||
)
|
||||
|
||||
|
||||
@@ -37,13 +37,13 @@ func UseGateway(env hway.Hway, ipc common.IPFS, db *hwayorm.Queries) echo.Middle
|
||||
return func(c echo.Context) error {
|
||||
ua := useragent.NewParser()
|
||||
ctx := &GatewayContext{
|
||||
Context: c,
|
||||
Querier: db,
|
||||
ipfsClient: ipc,
|
||||
agent: ua.Parse(c.Request().UserAgent()),
|
||||
grpcAddr: env.GetSonrGrpcUrl(),
|
||||
tokenStore: common.NewUCANStore(ipc),
|
||||
turnstileSiteKey: env.GetTurnstileSiteKey(),
|
||||
Context: c,
|
||||
Querier: db,
|
||||
ipfsClient: ipc,
|
||||
agent: ua.Parse(c.Request().UserAgent()),
|
||||
grpcAddr: env.GetSonrGrpcUrl(),
|
||||
tokenStore: common.NewUCANStore(ipc),
|
||||
// turnstileSiteKey: env.GetTurnstileSiteKey(),
|
||||
}
|
||||
return next(ctx)
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ func UpdateProfile(c echo.Context) (*hwayorm.Profile, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return profile, nil
|
||||
return &profile, nil
|
||||
}
|
||||
|
||||
func ReadProfile(c echo.Context) (*hwayorm.Profile, error) {
|
||||
@@ -36,7 +36,7 @@ func ReadProfile(c echo.Context) (*hwayorm.Profile, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return profile, nil
|
||||
return &profile, nil
|
||||
}
|
||||
|
||||
func DeleteProfile(c echo.Context) error {
|
||||
|
||||
Reference in New Issue
Block a user