This commit is contained in:
parent
04852f2fbc
commit
3837302161
2 changed files with 7 additions and 1 deletions
|
@ -13,7 +13,7 @@ CREATE TABLE IF NOT EXISTS user_session (
|
||||||
"user" varchar(255) NOT NULL,
|
"user" varchar(255) NOT NULL,
|
||||||
"created" timestamptz NOT NULL DEFAULT NOW(),
|
"created" timestamptz NOT NULL DEFAULT NOW(),
|
||||||
"csrf" UUID NOT NULL DEFAULT gen_random_uuid(),
|
"csrf" UUID NOT NULL DEFAULT gen_random_uuid(),
|
||||||
"name" varchar(255)
|
"name" varchar(255),
|
||||||
kind session_kind NOT NULL DEFAULT 'user',
|
kind session_kind NOT NULL DEFAULT 'user',
|
||||||
FOREIGN KEY("user") REFERENCES users(username)
|
FOREIGN KEY("user") REFERENCES users(username)
|
||||||
);
|
);
|
||||||
|
|
|
@ -25,3 +25,9 @@ impl<'r> FromRequest<'r> for RequestContext {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for RequestContext {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self { is_htmx: false }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue