From c2268c285648ef02ece04de0d9df0813c6d70ff8 Mon Sep 17 00:00:00 2001
From: benj <benj@rse8.com>
Date: Sat, 24 Dec 2022 00:43:38 -0800
Subject: refactor everything with more abstraction and a nicer interface

---
 .../store/sqlite/sql/write_email_validation.sql    | 43 ----------------------
 1 file changed, 43 deletions(-)
 delete mode 100644 crates/secd/store/sqlite/sql/write_email_validation.sql

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

diff --git a/crates/secd/store/sqlite/sql/write_email_validation.sql b/crates/secd/store/sqlite/sql/write_email_validation.sql
deleted file mode 100644
index d839310..0000000
--- a/crates/secd/store/sqlite/sql/write_email_validation.sql
+++ /dev/null
@@ -1,43 +0,0 @@
-insert into email_validation
-       (
-           email_validation_public_id
-           , email_id
-           , code
-           , is_oauth_derived
-           , created_at
-           , validated_at
-           , expired_at
-       )
-values (
-           ?1
-           , ?2
-           , ?3
-           , ?4
-           , ?5
-           , ?6
-           , ?7
-) on conflict (email_validation_public_id) do update
-  set validated_at = excluded.validated_at
-      , expired_at   = excluded.expired_at;
---
-insert into identity_email_validation (
-       identity_id
-       , email_validation_id
-       , revoked_at
-       , deleted_at
-) values (
-       (
-       select identity_id
-       from identity
-       where identity_public_id = ?1
-       )
-       , (
-         select email_validation_id
-         from email_validation
-         where email_validation_public_id = ?2
-         )
-        , ?3
-        , ?4
-) on conflict (identity_id, email_validation_id) do update
-  set revoked_at = excluded.revoked_at
-      , deleted_at = excluded.deleted_at;
-- 
cgit v1.2.3

