fix compilation error brought in by raw endpoint
This commit is contained in:
parent
2f90f2658d
commit
c9d9c711b5
3 changed files with 15 additions and 7 deletions
|
@ -93,6 +93,7 @@ library
|
||||||
, servant
|
, servant
|
||||||
, servant-server
|
, servant-server
|
||||||
, servant-rawm >= 0.3.0.0
|
, servant-rawm >= 0.3.0.0
|
||||||
|
, servant-rawm-server
|
||||||
, opaleye
|
, opaleye
|
||||||
, aeson
|
, aeson
|
||||||
, text
|
, text
|
||||||
|
|
12
shell.nix
12
shell.nix
|
@ -56,9 +56,11 @@ let
|
||||||
f = { mkDerivation, aeson, base, base16-bytestring
|
f = { mkDerivation, aeson, base, base16-bytestring
|
||||||
, bytestring, case-insensitive, clock
|
, bytestring, case-insensitive, clock
|
||||||
, containers, extra, HsYAML, http-api-data, http-types, iproute
|
, containers, extra, HsYAML, http-api-data, http-types, iproute
|
||||||
, mtl, network, opaleye, optparse-applicative, postgresql-simple
|
, mtl, network, opaleye, optparse-applicative
|
||||||
|
, postgresql-simple
|
||||||
, product-profunctors, profunctors
|
, product-profunctors, profunctors
|
||||||
, pureMD5, random-bytestring, servant, servant-rawm, servant-server
|
, pureMD5, random-bytestring, servant, servant-rawm, servant-rawm-server
|
||||||
|
, servant-server
|
||||||
, stdenv, stm, text, time, wai, wai-logger, wai-middleware-throttle
|
, stdenv, stm, text, time, wai, wai-logger, wai-middleware-throttle
|
||||||
, warp
|
, warp
|
||||||
}:
|
}:
|
||||||
|
@ -72,11 +74,13 @@ let
|
||||||
aeson base base16-bytestring base64-bytestring bytestring
|
aeson base base16-bytestring base64-bytestring bytestring
|
||||||
containers http-api-data http-types mtl opaleye postgresql-simple
|
containers http-api-data http-types mtl opaleye postgresql-simple
|
||||||
product-profunctors profunctors pureMD5 random-bytestring servant
|
product-profunctors profunctors pureMD5 random-bytestring servant
|
||||||
servant-rawm servant-server stm text time wai wai-logger warp
|
servant-rawm servant-rawm-server servant-server stm text time wai
|
||||||
|
wai-logger warp
|
||||||
];
|
];
|
||||||
executableHaskellDepends = [
|
executableHaskellDepends = [
|
||||||
base base16-bytestring bytestring case-insensitive clock containers
|
base base16-bytestring bytestring case-insensitive clock containers
|
||||||
extra HsYAML iproute mtl network opaleye optparse-applicative
|
extra HsYAML iproute mtl network opaleye
|
||||||
|
optparse-applicative
|
||||||
postgresql-simple postgresql-simple-migration servant
|
postgresql-simple postgresql-simple-migration servant
|
||||||
servant-server stm text time wai wai-logger wai-middleware-throttle
|
servant-server stm text time wai wai-logger wai-middleware-throttle
|
||||||
warp
|
warp
|
||||||
|
|
|
@ -9,10 +9,14 @@ module API where
|
||||||
|
|
||||||
import Servant.API
|
import Servant.API
|
||||||
import Servant.Links
|
import Servant.Links
|
||||||
import Servant.RawM
|
|
||||||
|
|
||||||
import Data.Proxy
|
import Data.Proxy
|
||||||
|
|
||||||
|
import Servant.RawM
|
||||||
|
import Servant.RawM.Server ()
|
||||||
|
|
||||||
|
import Network.Wai (Application)
|
||||||
|
|
||||||
-- internal imports
|
-- internal imports
|
||||||
|
|
||||||
import Types
|
import Types
|
||||||
|
@ -61,7 +65,7 @@ type MateAPI = "v1" :> (
|
||||||
:> ReqBody '[JSON] JournalCashCheck
|
:> ReqBody '[JSON] JournalCashCheck
|
||||||
:> Post '[JSON] ()
|
:> Post '[JSON] ()
|
||||||
|
|
||||||
:<|> "avatar" :> Capture "id" Int :> RawM
|
:<|> "avatar" :> Capture "id" Int :> RawM' Application
|
||||||
:<|> "avatar" :> AuthProtect "header-auth" :> ReqBody '[JSON] AvatarData
|
:<|> "avatar" :> AuthProtect "header-auth" :> ReqBody '[JSON] AvatarData
|
||||||
:> Post '[JSON] Int
|
:> Post '[JSON] Int
|
||||||
:<|> "avatar" :> AuthProtect "header-auth" :> Capture "id" Int
|
:<|> "avatar" :> AuthProtect "header-auth" :> Capture "id" Int
|
||||||
|
@ -89,7 +93,6 @@ type MateAPI = "v1" :> (
|
||||||
:<|> "meta" :> Get '[JSON] MetaInformation
|
:<|> "meta" :> Get '[JSON] MetaInformation
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
authGetLink :: Link
|
authGetLink :: Link
|
||||||
authSendLink :: Link
|
authSendLink :: Link
|
||||||
authLogoutLink :: Link
|
authLogoutLink :: Link
|
||||||
|
|
Loading…
Reference in a new issue