Started working on the frontend
- Added the new post frontend - Hooked up publishing of posts to the site publisher - Added an site exporter as a publishing target
This commit is contained in:
parent
a59008b3e8
commit
e77cac2fd5
40 changed files with 1427 additions and 84 deletions
|
|
@ -1,6 +1,9 @@
|
|||
-- name: SelectPostsOfSite :many
|
||||
SELECT * FROM posts WHERE site_id = ? ORDER BY created_at DESC LIMIT 10;
|
||||
|
||||
-- name: SelectPostByGUID :one
|
||||
SELECT * FROM posts WHERE guid = ? LIMIT 1;
|
||||
|
||||
-- name: InsertPost :one
|
||||
INSERT INTO posts (
|
||||
site_id,
|
||||
|
|
@ -11,4 +14,12 @@ INSERT INTO posts (
|
|||
created_at,
|
||||
published_at
|
||||
) VALUES (?, ?, ?, ?, ?, ?, ?)
|
||||
RETURNING id;
|
||||
RETURNING id;
|
||||
|
||||
-- name: UpdatePost :exec
|
||||
UPDATE posts SET
|
||||
title = ?,
|
||||
body = ?,
|
||||
slug = ?,
|
||||
published_at = ?
|
||||
WHERE id = ?;
|
||||
|
|
@ -35,4 +35,5 @@ CREATE TABLE posts (
|
|||
created_at INTEGER NOT NULL,
|
||||
published_at INTEGER NOT NULL
|
||||
);
|
||||
CREATE INDEX idx_post_site ON posts (site_id);
|
||||
CREATE INDEX idx_post_site ON posts (site_id);
|
||||
CREATE UNIQUE INDEX idx_post_guid ON posts (guid);
|
||||
Loading…
Add table
Add a link
Reference in a new issue