summaryrefslogtreecommitdiff
path: root/overlays/spm
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-12-20 20:51:48 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-12-20 20:51:48 +0100
commit164204149c458378a0f9126f629c043e7cb7c3f2 (patch)
treec5ea6d68101c581a93fcaf7e1c358b05797f02b4 /overlays/spm
parent872b0abaf557048407b5b9c0ef853895c1ede87d (diff)
downloadnixos-164204149c458378a0f9126f629c043e7cb7c3f2.tar
nixos-164204149c458378a0f9126f629c043e7cb7c3f2.tar.gz
nixos-164204149c458378a0f9126f629c043e7cb7c3f2.tar.bz2
nixos-164204149c458378a0f9126f629c043e7cb7c3f2.tar.xz
nixos-164204149c458378a0f9126f629c043e7cb7c3f2.zip
bump
Diffstat (limited to 'overlays/spm')
-rw-r--r--overlays/spm/server/Spm/Server.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/overlays/spm/server/Spm/Server.hs b/overlays/spm/server/Spm/Server.hs
index 6bb9dfe6..e6a876cb 100644
--- a/overlays/spm/server/Spm/Server.hs
+++ b/overlays/spm/server/Spm/Server.hs
@@ -275,7 +275,9 @@ spmServer dom mbox = whoami
275 275
276 spmSql $ do 276 spmSql $ do
277 Entity mailboxMappingMailbox _ <- maybe (throwError err404) return <=< getBy $ UniqueMailbox mbox 277 Entity mailboxMappingMailbox _ <- maybe (throwError err404) return <=< getBy $ UniqueMailbox mbox
278 maybe (throwError err400{ errBody = "Address already claimed" }) (const $ return NoContent) =<< insertUnique MailboxMapping{mailboxMappingExtension = Nothing, mailboxMappingDomain = dom, mailboxMappingReject = False, ..} 278 insert_ MailboxMapping{mailboxMappingExtension = Nothing, mailboxMappingDomain = dom, mailboxMappingReject = False, ..}
279
280 return NoContent
279 281
280 listMappings = spmSql $ do 282 listMappings = spmSql $ do
281 Entity mailboxId _ <- maybe (throwError err404) return <=< getBy $ UniqueMailbox mbox 283 Entity mailboxId _ <- maybe (throwError err404) return <=< getBy $ UniqueMailbox mbox