feat: now PostImage return Image struct even on duplicate data
All checks were successful
Build (backend build only) / build (push) Successful in 3m18s
Build and Deploy Go App / build (push) Successful in 8m32s
Build and Deploy Go App / deploy (push) Successful in 27s

This commit is contained in:
Iron_Felix 2025-12-20 01:16:26 +03:00
parent c58b578023
commit 4fe077d229
3 changed files with 55 additions and 29 deletions

View file

@ -3,6 +3,11 @@ SELECT id, storage_type, image_path
FROM images
WHERE id = sqlc.arg('illust_id')::bigint;
-- name: GetImageByPath :one
SELECT id, storage_type, image_path
FROM images
WHERE image_path = sqlc.arg('illust_path')::text;
-- name: CreateImage :one
INSERT INTO images (storage_type, image_path)
VALUES ($1, $2)