From 164204149c458378a0f9126f629c043e7cb7c3f2 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 20 Dec 2022 20:51:48 +0100 Subject: bump --- overlays/spm/server/Spm/Server.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'overlays/spm/server/Spm/Server.hs') 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 spmSql $ do Entity mailboxMappingMailbox _ <- maybe (throwError err404) return <=< getBy $ UniqueMailbox mbox - maybe (throwError err400{ errBody = "Address already claimed" }) (const $ return NoContent) =<< insertUnique MailboxMapping{mailboxMappingExtension = Nothing, mailboxMappingDomain = dom, mailboxMappingReject = False, ..} + insert_ MailboxMapping{mailboxMappingExtension = Nothing, mailboxMappingDomain = dom, mailboxMappingReject = False, ..} + + return NoContent listMappings = spmSql $ do Entity mailboxId _ <- maybe (throwError err404) return <=< getBy $ UniqueMailbox mbox -- cgit v1.2.3