aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorJoris2017-03-26 21:10:42 +0200
committerJoris2017-03-26 21:10:42 +0200
commit1e47a7754ca38bd1a6c74765d8378caf68ce4619 (patch)
treed0d9238479dc2529a1b558bbbcde346e7e8c2935 /src/server
parentc0ac16a713c4e53cf6af8e72a6d5f6b8ac5d6456 (diff)
Separate client and server watch
Diffstat (limited to 'src/server')
-rw-r--r--src/server/Main.hs19
-rw-r--r--src/server/Model/Message/Key.hs1
-rw-r--r--src/server/Model/Message/Translations.hs5
3 files changed, 13 insertions, 12 deletions
diff --git a/src/server/Main.hs b/src/server/Main.hs
index b7764c9..7ae8c1c 100644
--- a/src/server/Main.hs
+++ b/src/server/Main.hs
@@ -1,22 +1,17 @@
{-# LANGUAGE OverloadedStrings #-}
-import Web.Scotty
-
import Network.Wai.Middleware.Static
-
-import Job.Daemon (runDaemons)
-
import qualified Data.Text.Lazy as LT
+import Web.Scotty
-import qualified Controller.Index as Index
-import qualified Controller.SignIn as SignIn
-import qualified Controller.Payment as Payment
-import qualified Controller.Income as Income
-import qualified Controller.Category as Category
-
+import Job.Daemon (runDaemons)
import Model.Database (runMigrations)
-
import qualified Conf
+import qualified Controller.Category as Category
+import qualified Controller.Income as Income
+import qualified Controller.Index as Index
+import qualified Controller.Payment as Payment
+import qualified Controller.SignIn as SignIn
main :: IO ()
main = do
diff --git a/src/server/Model/Message/Key.hs b/src/server/Model/Message/Key.hs
index 36b3ba0..79ccf39 100644
--- a/src/server/Model/Message/Key.hs
+++ b/src/server/Model/Message/Key.hs
@@ -127,6 +127,7 @@ data Key =
| Empty
| InvalidString
| InvalidDate
+ | CostMustNotBeNull
| InvalidInt
| InvalidCategory
| SmallerIntThan
diff --git a/src/server/Model/Message/Translations.hs b/src/server/Model/Message/Translations.hs
index 6565344..16fc3fd 100644
--- a/src/server/Model/Message/Translations.hs
+++ b/src/server/Model/Message/Translations.hs
@@ -498,6 +498,11 @@ m l InvalidDate =
English -> "day/month/year required"
French -> "jour/mois/année requis"
+m l CostMustNotBeNull =
+ case l of
+ English -> "Cost must not be zero"
+ French -> "Le coût ne doît pas être nul"
+
m l InvalidInt =
case l of
English -> "Integer required"