feat: implemented /users/{id} api route
This commit is contained in:
parent
71e2661fb9
commit
948e036e8c
10 changed files with 381 additions and 982 deletions
|
|
@ -1,17 +1,17 @@
|
|||
-- name: GetImageByID :one
|
||||
SELECT image_id, storage_type, image_path
|
||||
SELECT id, storage_type, image_path
|
||||
FROM images
|
||||
WHERE image_id = $1;
|
||||
WHERE id = $1;
|
||||
|
||||
-- -- name: CreateImage :one
|
||||
-- INSERT INTO images (storage_type, image_path)
|
||||
-- VALUES ($1, $2)
|
||||
-- RETURNING image_id, storage_type, image_path;
|
||||
-- name: CreateImage :one
|
||||
INSERT INTO images (storage_type, image_path)
|
||||
VALUES ($1, $2)
|
||||
RETURNING id, storage_type, image_path;
|
||||
|
||||
-- -- name: GetUserByID :one
|
||||
-- SELECT user_id, avatar_id, passhash, mail, nickname, disp_name, user_desc, creation_date
|
||||
-- FROM users
|
||||
-- WHERE user_id = $1;
|
||||
-- name: GetUserByID :one
|
||||
SELECT id, avatar_id, mail, nickname, disp_name, user_desc, creation_date
|
||||
FROM users
|
||||
WHERE id = $1;
|
||||
|
||||
-- -- name: ListUsers :many
|
||||
-- SELECT user_id, avatar_id, passhash, mail, nickname, disp_name, user_desc, creation_date
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue