chore: bump version to v1.2.3 - Fix CORS & Update Notification

This commit is contained in:
dyzulk
2026-01-19 13:29:20 +07:00
parent 51ca6d3669
commit ca1fef86bd
6 changed files with 143 additions and 2 deletions

View File

@@ -27,6 +27,34 @@ class Router {
return $this->addRoute('POST', $path, $callback);
}
/**
* Add a OPTIONS route (Crucial for CORS Preflight)
*/
public function options($path, $callback) {
return $this->addRoute('OPTIONS', $path, $callback);
}
/**
* Add a PUT route
*/
public function put($path, $callback) {
return $this->addRoute('PUT', $path, $callback);
}
/**
* Add a PATCH route
*/
public function patch($path, $callback) {
return $this->addRoute('PATCH', $path, $callback);
}
/**
* Add a DELETE route
*/
public function delete($path, $callback) {
return $this->addRoute('DELETE', $path, $callback);
}
/**
* Add route to collection and return $this for chaining
*/