mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-06 05:19:28 +00:00
adds a select to the profilUpdateRequests to change display between only pending and all requests
This commit is contained in:
@@ -16,6 +16,7 @@ class ProfilUpdate extends Auth_Controller
|
||||
'acceptProfilRequest'=>['user:r'],
|
||||
'denyProfilRequest'=>['user:r'],
|
||||
'show'=>['user:r'],
|
||||
'getPendingRequests'=>['user:r'],
|
||||
|
||||
]);
|
||||
|
||||
@@ -49,6 +50,15 @@ class ProfilUpdate extends Auth_Controller
|
||||
echo json_encode($res);
|
||||
}
|
||||
|
||||
public function getPendingRequests(){
|
||||
$res = $this->ProfilChangeModel->loadWhere(["status"=>"pending"]);
|
||||
|
||||
$res = hasData($res)? getData($res) : [];
|
||||
|
||||
|
||||
echo json_encode($res);
|
||||
}
|
||||
|
||||
public function acceptProfilRequest(){
|
||||
|
||||
$_POST = json_decode($this->input->raw_input_stream,true);
|
||||
|
||||
Reference in New Issue
Block a user