Last active
December 16, 2015 15:49
-
-
Save JefClaes/5458275 to your computer and use it in GitHub Desktop.
I do something very similar to what @tjaskula is doing. I approve!
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
| public class ConfirmationModule : NancyModule | |
| { | |
| public ConfirmationModule(IBus bus) | |
| { | |
| Get["confirm/done"] = p => | |
| { | |
| return View["ConfirmationDone"]; | |
| }; | |
| Post["confirm/{token}"] = p => | |
| { | |
| Guid parsedToken; | |
| if (Guid.TryParse(p.token, out parsedToken)) | |
| { | |
| bus.ExecuteCommand(new ConfirmQueryCommand(p.token)); | |
| return Response.AsRedirect("done"); | |
| } | |
| return HttpStatusCode.NotFound; | |
| }; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment