Skip to content

Commit

Permalink
Require POST request
Browse files Browse the repository at this point in the history
  • Loading branch information
Shashank Atreya committed Nov 29, 2023
1 parent b23d9bc commit 96b3837
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/Api/UpdateMessageApiModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ class UpdateMessageApiModule extends ApiBase {
*
*/
public function execute() {
$messageName = $this->getRequest()->getText( 'messagename' );
$value = $this->getRequest()->getText( 'value' );
$postValues = $this->getRequest()->getPostValues();
$messageName = $postValues[ 'messagename' ];
$value = $postValues[ 'value' ];

$services = MediaWikiServices::getInstance();
$loadBalancer = $services->getDBLoadBalancer();

Expand Down Expand Up @@ -46,6 +48,13 @@ public function execute() {
] );
}

/**
* @return true
*/
public function mustBePosted() {
return true;
}

/**
* @return mixed
*/
Expand Down

0 comments on commit 96b3837

Please sign in to comment.