generate links

This commit is contained in:
nek0 2019-09-16 09:00:11 +02:00
parent c3322a54de
commit dc15ce43d8
1 changed files with 35 additions and 0 deletions

View File

@ -11,8 +11,11 @@
module API where
import Servant.API
import Servant.Links
import Servant.RawM
import Data.Proxy
-- internal imports
import Types
@ -62,3 +65,35 @@ type MateAPI =
:<|> "avatar" :> AuthProtect "header-auth" :> Capture "id" Int
:> ReqBody '[JSON] AvatarData :> Patch '[JSON] ()
:<|> "avatar" :> "list" :> Get '[JSON] [Avatar]
( authGetLink :<|>
authSendLink :<|>
authLogoutLink :<|>
authManageListLink :<|>
authManageNewAuthLink :<|>
authManageDeleteAuthLink :<|>
userNewLink :<|>
userGetLink :<|>
userUpdateLink :<|>
userListLink :<|>
userRechargeLink :<|>
userTransferLink :<|>
productNewLink :<|>
productOverviewLink :<|>
productStockRefillLink :<|>
productStockUpdateLink :<|>
productListLink :<|>
buyLink :<|>
journalShowLink :<|>
avatarGetLink :<|>
avaterInsertLink :<|>
avatarUpdateLink :<|>
avatarListLink
) = allLinks (Proxy :: Proxy MateAPI)