Skip to content

Commit

Permalink
parameter should be called 'user' like most other endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Derkades committed Oct 24, 2021
1 parent aa1ce95 commit fb341a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/Core/includes/endpoints/BanUserEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ public function __construct() {
}

public function execute(Nameless2API $api) {
$api->validateParams($_POST, ['id']);
$api->validateParams($_POST, ['user']);

$user = $api->getUser('id', $_POST['id']);
$user = $api->getUser('id', $_POST['user']);

$user->update([
'isbanned' => 1,
Expand All @@ -22,4 +22,4 @@ public function execute(Nameless2API $api) {
'user_id', '=', $user->data()->id
]);
}
}
}

0 comments on commit fb341a4

Please sign in to comment.