1234567891011121314151617181920212223242526
  1. <?php
  2. require_once("lib/limonade.php");
  3. dispatch_get("/", "redirect_data");
  4. dispatch_get("/data", "data");
  5. dispatch_get("/data/extract", "data_extract");
  6. dispatch_get("/document", "document");
  7. dispatch_get("/promo", "promo");
  8. dispatch_post("/document", "add_document");
  9. dispatch_post("/promo", "add_promo");
  10. dispatch_put("/data/:dataid", "alter_data");
  11. dispatch_put("/document/:documentid", "alter_document");
  12. dispatch_put("/promo/:promoid", "alter_promo");
  13. dispatch_delete("/document/:fileid", "delete_document");
  14. dispatch_delete("/promo/:promoid", "delete_promo");
  15. try {
  16. run();
  17. }
  18. catch (Exception $e) {
  19. error_log($e);
  20. }