Created
December 6, 2021 20:40
-
-
Save forki/715626dcfd026cccf386e6b33390113f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let defaultRouter = router { | |
post "/newwish" (fun next (ctx: HttpContext) -> task { | |
let! message = ctx.ReadBodyFromRequestAsync() | |
let wish = { | |
OriginalMessage = message | |
} | |
let data = Newtonsoft.Json.JsonConvert.SerializeObject wish | |
let message = ServiceBusMessage data | |
do! serviceBusSender.Force().SendMessageAsync message | |
return! Response.ok ctx "" | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment