Started styling the app and have got editing posts working.
This commit is contained in:
parent
7ef6725bdb
commit
bf5d6cbe52
20 changed files with 511 additions and 41 deletions
|
|
@ -1,6 +1,9 @@
|
|||
-- name: ListPosts :many
|
||||
SELECT * FROM post WHERE site_id = $1 ORDER BY post_date DESC LIMIT 25;
|
||||
|
||||
-- name: GetPostWithID :one
|
||||
SELECT * FROM post WHERE id = $1 LIMIT 1;
|
||||
|
||||
-- name: ListPublishablePosts :many
|
||||
SELECT *
|
||||
FROM post
|
||||
|
|
@ -17,4 +20,15 @@ INSERT INTO post (
|
|||
post_date,
|
||||
created_at
|
||||
) VALUES ($1, $2, $3, $4, $5, $6, $7)
|
||||
RETURNING id;
|
||||
RETURNING id;
|
||||
|
||||
-- name: UpdatePost :exec
|
||||
UPDATE post SET
|
||||
site_id = $2,
|
||||
title = $3,
|
||||
body = $4,
|
||||
state = $5,
|
||||
props = $6,
|
||||
post_date = $7
|
||||
-- updated_at = $7
|
||||
WHERE id = $1;
|
||||
Loading…
Add table
Add a link
Reference in a new issue