aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--conf/clog.conf2
-rw-r--r--db/db.sql4
3 files changed, 4 insertions, 4 deletions
diff --git a/README.md b/README.md
index 8eed2df..f30867b 100644
--- a/README.md
+++ b/README.md
@@ -4,9 +4,7 @@ An attempt to reimplement flog, using the [kore.io](https://kore.io) framework.
## TODO
-* Use UUIDs for primary key in PostgreSQL.
* Dockerize.
* Determine how to handle `lib`/dependencies.
-* Add GET /resource/{UUID} endpoint.
* Figure out how to build a statically-linked/standalone binary.
* Upgrade to Kore 4.2.
diff --git a/conf/clog.conf b/conf/clog.conf
index 8a6cf81..2415e5b 100644
--- a/conf/clog.conf
+++ b/conf/clog.conf
@@ -27,7 +27,7 @@ domain * {
filemap /static/ assets/static
route / posts
- route ^/posts/[a-z1-9\-]+$ post
+ route ^/posts/[a-z0-9\-]+$ post
route /posts posts
}
diff --git a/db/db.sql b/db/db.sql
index 921ce06..421176f 100644
--- a/db/db.sql
+++ b/db/db.sql
@@ -2,8 +2,10 @@ CREATE DATABASE clog;
\connect clog
+CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
+
CREATE TABLE posts (
- id BIGINT NOT NULL, -- PRIMARY KEY UUID
+ id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
title CHARACTER VARYING NOT NULL,
body CHARACTER VARYING NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT NOW(),