about summary refs log tree commit diff
path: root/website/sandbox/learnpianochords/src/server/API.hs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-08-06T21·21+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-08-06T21·23+0100
commita7ddb56b9bdca9773d6d0b71ffa128cd64c9485e (patch)
tree07e799b99b9f9a72e247e1133acf835aed641d3a /website/sandbox/learnpianochords/src/server/API.hs
parent1fc1087014a235a4fd153ea239ec3e5509757c17 (diff)
Support echo server to test POST /verify
TL;DR:
- Add common dependencies like Servant, Aeson, Warp, Cors
- Define a POST /verify endpoint for our client to hit
- POST to /verify client-side onSignIn
Diffstat (limited to 'website/sandbox/learnpianochords/src/server/API.hs')
-rw-r--r--website/sandbox/learnpianochords/src/server/API.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/website/sandbox/learnpianochords/src/server/API.hs b/website/sandbox/learnpianochords/src/server/API.hs
new file mode 100644
index 000000000000..039252e764ac
--- /dev/null
+++ b/website/sandbox/learnpianochords/src/server/API.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE TypeOperators #-}
+--------------------------------------------------------------------------------
+module API where
+--------------------------------------------------------------------------------
+import Data.Text
+import Servant.API
+import Web.Cookie
+
+import qualified Types as T
+--------------------------------------------------------------------------------
+
+type API = "verify"
+           :> ReqBody '[JSON] T.VerifyGoogleSignInRequest
+           :> Post '[JSON] NoContent