Skip to content

Commit 969d5d6

Browse files
committed
Merge pull request #657 from LearningLocker/issue/basicrequestcontroller
Fixes BasicRequestController.
2 parents 6dd37f2 + 4490964 commit 969d5d6

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

app/controllers/xapi/BasicRequestController.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,23 @@ class BasicRequestController extends BaseController {
1717
* @param Lrs $lrs
1818
* @param Client $client
1919
*/
20-
public function __construct(Client $client){
21-
$this->client = $client;
22-
$this->beforeFilter('@getLrs');
23-
$this->beforeFilter('@setParameters', ['except' => 'store', 'put']);
20+
public function __construct(Client $client_repo){
21+
parent::__construct();
22+
$this->client_repo = $client_repo;
2423
}
2524

2625
/**
2726
* Create a client and return the credentials.
2827
* @return Response
2928
*/
3029
public function store(){
31-
$content = \LockerRequest::getContent();
32-
3330
$opts = ['lrs_id' => $this->lrs->_id];
34-
$client = $this->client->store([], $opts);
31+
$client = $this->client_repo->store([
32+
'authority' => [
33+
'name' => 'API Client',
34+
'mbox' => 'mailto:[email protected]'
35+
]
36+
], $opts);
3537

3638
if($client){
3739
$returnCredentials = array(

0 commit comments

Comments
 (0)