Skip to content

Instantly share code, notes, and snippets.

@vshapenko
Created May 29, 2019 09:00
Show Gist options
  • Save vshapenko/17f3a3cb26faf8dcbcdc8ccd59d7d797 to your computer and use it in GitHub Desktop.
Save vshapenko/17f3a3cb26faf8dcbcdc8ccd59d7d797 to your computer and use it in GitHub Desktop.
let addPriceOverride (zodConfig: ZodConfigs) (toJson: IJsonSerializer): HttpHandler = ..
let updatePriceOverride (zodConfig: ZodConfigs) (toJson: IJsonSerializer): HttpHandler = ..
let cancelPriceOverride (zodConfig: ZodConfigs) (toJson: IJsonSerializer): HttpHandler = ..
let addDeal (zodConfig: ZodConfigs) (toJson: IJsonSerializer): HttpHandler = ..
let updateDeal (zodConfig: ZodConfigs) (toJson: IJsonSerializer): HttpHandler = ..
let cancelDeal (zodConfig: ZodConfigs) (toJson: IJsonSerializer): HttpHandler = ..
let zodWebApp (zodConfig: ZodConfigs) (toJson: IJsonSerializer): HttpHandler =
let addRoute path auth data=
route path>=>jacAuthorize auth>=>routeData|>List.map (fun (m,f)->m>=> f zodConfig serializer)|>choose
"
choose [
yield addRoute "api/v1/scheduledaction/priceoverride" "api.zod.priceoverride"
[
POST,addPriceOverride
PUT,updatePriceOverride
]
yield addRoute "api/v1/scheduledaction/priceoverride/cancel" "api.zod.priceoverride.cancel" [POST,cancelPriceOverride ]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment