Implement EditAccount in Backend

This commit is contained in:
jacob1123 committed 2022-02-24 22:12:10 +00:00
1 parent 03d1d1e520
commit f51807e459
5 files changed
+79 -5

No files matched your search

+8 -1
View File
@@ -25,4 +25,11 @@ ORDER BY accounts.name;
SELECT accounts.id, accounts.budget_id, accounts.name, true as is_account FROM accounts
WHERE accounts.budget_id = @budget_id
AND accounts.name LIKE @search
ORDER BY accounts.name;
ORDER BY accounts.name;
-- name: UpdateAccount :one
UPDATE accounts
SET name = $1,
on_budget = $2
WHERE accounts.id = $3
RETURNING *;