mirror of
https://github.com/friendica/friendica
synced 2025-04-22 07:10:24 +00:00
Add all required HTTP methods
This commit is contained in:
parent
8ae2e3caf8
commit
6236870aa4
5 changed files with 137 additions and 10 deletions
|
@ -276,11 +276,23 @@ class Module
|
|||
|
||||
$profiler->set(microtime(true) - $timestamp, 'init');
|
||||
|
||||
if ($server['REQUEST_METHOD'] === 'POST') {
|
||||
if ($server['REQUEST_METHOD'] === Router::DELETE) {
|
||||
call_user_func([$this->module_class, 'delete'], $this->module_parameters);
|
||||
}
|
||||
|
||||
if ($server['REQUEST_METHOD'] === Router::PATCH) {
|
||||
call_user_func([$this->module_class, 'patch'], $this->module_parameters);
|
||||
}
|
||||
|
||||
if ($server['REQUEST_METHOD'] === Router::POST) {
|
||||
Core\Hook::callAll($this->module . '_mod_post', $post);
|
||||
call_user_func([$this->module_class, 'post'], $this->module_parameters);
|
||||
}
|
||||
|
||||
if ($server['REQUEST_METHOD'] === Router::PUT) {
|
||||
call_user_func([$this->module_class, 'put'], $this->module_parameters);
|
||||
}
|
||||
|
||||
Core\Hook::callAll($this->module . '_mod_afterpost', $placeholder);
|
||||
call_user_func([$this->module_class, 'afterpost'], $this->module_parameters);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue