fix compilation error brought in by raw endpoint

This commit is contained in:
nek0 2021-01-31 02:22:47 +01:00
parent 2f90f2658d
commit c9d9c711b5
3 changed files with 15 additions and 7 deletions

View File

@ -93,6 +93,7 @@ library
, servant
, servant-server
, servant-rawm >= 0.3.0.0
, servant-rawm-server
, opaleye
, aeson
, text

View File

@ -56,9 +56,11 @@ let
f = { mkDerivation, aeson, base, base16-bytestring
, bytestring, case-insensitive, clock
, 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
, 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
, warp
}:
@ -72,11 +74,13 @@ let
aeson base base16-bytestring base64-bytestring bytestring
containers http-api-data http-types mtl opaleye postgresql-simple
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 = [
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
servant-server stm text time wai wai-logger wai-middleware-throttle
warp

View File

@ -9,10 +9,14 @@ module API where
import Servant.API
import Servant.Links
import Servant.RawM
import Data.Proxy
import Servant.RawM
import Servant.RawM.Server ()
import Network.Wai (Application)
-- internal imports
import Types
@ -61,7 +65,7 @@ type MateAPI = "v1" :> (
:> ReqBody '[JSON] JournalCashCheck
:> Post '[JSON] ()
:<|> "avatar" :> Capture "id" Int :> RawM
:<|> "avatar" :> Capture "id" Int :> RawM' Application
:<|> "avatar" :> AuthProtect "header-auth" :> ReqBody '[JSON] AvatarData
:> Post '[JSON] Int
:<|> "avatar" :> AuthProtect "header-auth" :> Capture "id" Int
@ -89,7 +93,6 @@ type MateAPI = "v1" :> (
:<|> "meta" :> Get '[JSON] MetaInformation
)
authGetLink :: Link
authSendLink :: Link
authLogoutLink :: Link