aboutsummaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-11-05 20:20:19 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-11-05 20:20:19 +0300
commit56115491d0dce58bf06f92fd5022363eb05a3755 (patch)
tree9bafaf76967eae6596d0959cf7a6a874006ba97e /cli
parentcef7ecfd83612f8cac4560034b3e01988f27c7ec (diff)
downloadzerobin-56115491d0dce58bf06f92fd5022363eb05a3755.tar.gz
Throw ZeroBinError instead of return Either
It can throw HttpException anyway
Diffstat (limited to 'cli')
-rw-r--r--cli/Main.hs6
1 files changed, 1 insertions, 5 deletions
diff --git a/cli/Main.hs b/cli/Main.hs
index 5d6b445..bcd7d54 100644
--- a/cli/Main.hs
+++ b/cli/Main.hs
@@ -72,9 +72,5 @@ main = do
cnt <- getContent (args `O.isPresent` O.longOption "file") text
case getExpiration expire of
Nothing -> die "invalid value for expiration"
- Just e -> do
- rc <- share bin e cnt
- case rc of
- Left err -> die err
- Right uri -> putStrLn uri
+ Just e -> share bin e cnt >>= putStrLn