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:
@@ -81,7 +81,7 @@ type Session struct {
|
||||
Challenge string `json:"challenge"`
|
||||
IsHumanFirst bool `json:"is_human_first"`
|
||||
IsHumanLast bool `json:"is_human_last"`
|
||||
ProfileID int64 `json:"profile_id"`
|
||||
ProfileID string `json:"profile_id"`
|
||||
}
|
||||
|
||||
type Vault struct {
|
||||
|
||||
@@ -56,7 +56,7 @@ type CreateSessionParams struct {
|
||||
Challenge string `json:"challenge"`
|
||||
IsHumanFirst bool `json:"is_human_first"`
|
||||
IsHumanLast bool `json:"is_human_last"`
|
||||
ProfileID int64 `json:"profile_id"`
|
||||
ProfileID string `json:"profile_id"`
|
||||
}
|
||||
|
||||
func (q *Queries) CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error) {
|
||||
@@ -551,7 +551,7 @@ RETURNING id, created_at, updated_at, deleted_at, browser_name, browser_version,
|
||||
`
|
||||
|
||||
type UpdateSessionWithProfileIDParams struct {
|
||||
ProfileID int64 `json:"profile_id"`
|
||||
ProfileID string `json:"profile_id"`
|
||||
ID string `json:"id"`
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ CREATE TABLE sessions (
|
||||
challenge TEXT NOT NULL,
|
||||
is_human_first BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_human_first IN (0,1)),
|
||||
is_human_last BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_human_last IN (0,1)),
|
||||
profile_id INTEGER NOT NULL
|
||||
profile_id TEXT NOT NULL
|
||||
);
|
||||
|
||||
-- Vaults store encrypted data
|
||||
|
||||
Reference in New Issue
Block a user