From f0ea9ecd17b03605d747044874a26e1bd52c0ee1 Mon Sep 17 00:00:00 2001
From: benj <benj@rse8.com>
Date: Thu, 29 Dec 2022 00:09:27 -0800
Subject: revoke session (+ some cleanup)

---
 crates/secd/store/sqlite/sql/write_session.sql | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'crates/secd/store/sqlite/sql/write_session.sql')

diff --git a/crates/secd/store/sqlite/sql/write_session.sql b/crates/secd/store/sqlite/sql/write_session.sql
index 4679912..9ffb105 100644
--- a/crates/secd/store/sqlite/sql/write_session.sql
+++ b/crates/secd/store/sqlite/sql/write_session.sql
@@ -7,4 +7,5 @@ insert into session (
 ) values (
   (select identity_id from identity where identity_public_id = $1)
   , $2, $3, $4, $5
-);
+) on conflict (token_hash) do update
+  set revoked_at = excluded.revoked_at;
-- 
cgit v1.2.3

