diff options
Diffstat (limited to 'overlays/spm/server/Spm')
-rw-r--r-- | overlays/spm/server/Spm/Server.hs | 4 |
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 |