HomeModule.cs 666 B

1234567891011121314151617181920212223242526272829303132
  1. using Nancy;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace xicheji
  8. {
  9. public class HomeModule : NancyModule
  10. {
  11. public HomeModule()
  12. {
  13. Get("/hello", (req) =>
  14. {
  15. return "ok~";
  16. });
  17. Get("/update", (req) =>
  18. {
  19. Program.MainForm.UpdateTitle(DateTime.Now);
  20. return "ok~";
  21. });
  22. Post("/update-car", (req) =>
  23. {
  24. //TODO
  25. return "ok~";
  26. });
  27. }
  28. }
  29. }