aboutsummaryrefslogtreecommitdiff
path: root/src/controllers
diff options
context:
space:
mode:
authorCamil Staps2015-05-12 22:44:16 +0200
committerCamil Staps2015-05-12 22:44:16 +0200
commita0bb2d17c662231ab45ab3910d6a8cafc01bd203 (patch)
treef72b9e7b99111030d1f21982a8d11953ce98a6dc /src/controllers
parentAccess-control-allow-{methods,headers} headers (diff)
Cleanup
Diffstat (limited to 'src/controllers')
-rw-r--r--src/controllers/CompetitionController.php2
-rw-r--r--src/controllers/CompetitionTypeController.php2
-rw-r--r--src/controllers/GameController.php2
-rw-r--r--src/controllers/ParticipantController.php2
-rw-r--r--src/controllers/UserController.php16
-rw-r--r--src/controllers/UserTokenController.php2
6 files changed, 7 insertions, 19 deletions
diff --git a/src/controllers/CompetitionController.php b/src/controllers/CompetitionController.php
index 6529433..c169492 100644
--- a/src/controllers/CompetitionController.php
+++ b/src/controllers/CompetitionController.php
@@ -29,7 +29,7 @@ class CompetitionController extends BaseController {
if ($this->competition->save()) {
return $this->response->created();
} else {
- throw new Dingo\Api\Exception\StoreResourceFailedException;
+ throw new \Dingo\Api\Exception\StoreResourceFailedException;
}
}
diff --git a/src/controllers/CompetitionTypeController.php b/src/controllers/CompetitionTypeController.php
index 430f7b5..a29d5db 100644
--- a/src/controllers/CompetitionTypeController.php
+++ b/src/controllers/CompetitionTypeController.php
@@ -29,7 +29,7 @@ class CompetitionTypeController extends BaseController {
if ($this->competitionType->save()) {
return $this->response->created();
} else {
- throw new Dingo\Api\Exception\StoreResourceFailedException;
+ throw new \Dingo\Api\Exception\StoreResourceFailedException;
}
}
diff --git a/src/controllers/GameController.php b/src/controllers/GameController.php
index 3ef9c37..15062c2 100644
--- a/src/controllers/GameController.php
+++ b/src/controllers/GameController.php
@@ -29,7 +29,7 @@ class GameController extends BaseController {
if ($this->game->save()) {
return $this->response->created();
} else {
- throw new Dingo\Api\Exception\StoreResourceFailedException;
+ throw new \Dingo\Api\Exception\StoreResourceFailedException;
}
}
diff --git a/src/controllers/ParticipantController.php b/src/controllers/ParticipantController.php
index 2ca28fb..a493146 100644
--- a/src/controllers/ParticipantController.php
+++ b/src/controllers/ParticipantController.php
@@ -29,7 +29,7 @@ class ParticipantController extends BaseController {
if ($this->participant->save()) {
return $this->response->created();
} else {
- throw new Dingo\Api\Exception\StoreResourceFailedException;
+ throw new \Dingo\Api\Exception\StoreResourceFailedException;
}
}
diff --git a/src/controllers/UserController.php b/src/controllers/UserController.php
index b5349d6..90e43ce 100644
--- a/src/controllers/UserController.php
+++ b/src/controllers/UserController.php
@@ -24,18 +24,6 @@ class UserController extends BaseController {
return $this->user->findOrFail($id);
}
- public function login() {
- Auth::basic();
-
- if (!Auth::check()) {
- throw new Exception\LoginException;
- } elseif (!empty(Input::get('redirect'))) {
- throw new Exception\RedirectException(Input::get('redirect'));
- }
-
- return Auth::user();
- }
-
public function update($id) {
$s = $this->user->find($id);
@@ -45,7 +33,7 @@ class UserController extends BaseController {
if ($s->save()) {
return $this->show($id);
} else {
- throw new Dingo\Api\Exception\UpdateResourceFailedException;
+ throw new \Dingo\Api\Exception\UpdateResourceFailedException;
}
}
@@ -66,7 +54,7 @@ class UserController extends BaseController {
if ($this->user->save()) {
return $this->response->created();
} else {
- throw new Dingo\Api\Exception\StoreResourceFailedException;
+ throw new \Dingo\Api\Exception\StoreResourceFailedException;
}
}
diff --git a/src/controllers/UserTokenController.php b/src/controllers/UserTokenController.php
index 2c2fe1e..99272ec 100644
--- a/src/controllers/UserTokenController.php
+++ b/src/controllers/UserTokenController.php
@@ -43,7 +43,7 @@ class UserTokenController extends BaseController {
return $this->userToken;
} else {
- throw new Dingo\Api\Exception\StoreResourceFailedException;
+ throw new \Dingo\Api\Exception\StoreResourceFailedException;
}
}