generate links
This commit is contained in:
parent
c3322a54de
commit
dc15ce43d8
1 changed files with 35 additions and 0 deletions
35
src/API.hs
35
src/API.hs
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue