mirror of
https://codeberg.org/shroff/phylum.git
synced 2026-01-06 03:31:02 -06:00
[server] Prepare for publink by root and user
This commit is contained in:
@@ -9,7 +9,13 @@ INSERT INTO publinks(name, created_by, root, password_hash, expires, max_accesse
|
||||
@name::text,
|
||||
@created_by::text,
|
||||
@root::uuid,
|
||||
sqlc.narg('password_hash')::text,
|
||||
@password_hash::text,
|
||||
sqlc.narg('expires')::timestamp,
|
||||
sqlc.narg('max_accesses')::int
|
||||
);
|
||||
@max_accesses::int
|
||||
);
|
||||
|
||||
-- name: PublinksByRoot :many
|
||||
SELECT * FROM publinks WHERE root = @root::uuid;
|
||||
|
||||
-- name: PublinksByCreator :many
|
||||
SELECT * FROM publinks WHERE created_by = @username::text;
|
||||
Reference in New Issue
Block a user