-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add tailwindcss * vue update to tailwindcss * vue update to tailwindcss * update tailwind * update tailwind * update tailwind * update tailwind * update submit buttons * update styles * set package.json * style changes * add file-manager * update styles * update styles * spa update * spa dedicated servers * spa update * spa update * spa admin games * spa admin users * spa admin nodes * spa update ui * spa admin daemon tasks * spa gameap daemon tasks * spa tokens * spa small updates * spa small updates * spa login * spa update icons * spa updates and fixes * spa content updates * spa fixes * remove composer.lock * remove unused controllers and views * spa fixes * remove irrelevant tests * update routes * fix routes * fix tests * update tests * update login browser test * fixes and updates * update consoles * update consoles * remove browser test * update console components * ui updates * ui responsive design updates * add permission test * update permissions tests * update permissions tests * update permissions tests * update permissions tests * update permissions tests * trying to fix permission tests * trying to fix permission tests * trying to fix permission tests * trying to fix permission tests * trying to fix permission tests * trying to fix permission tests * trying to fix permission tests, update phpunit * trying to fix permission tests * trying to fix permission tests * trying to fix permission tests * trying to fix permission tests * trying to fix permission tests * trying to fix permission tests * trying to fix permission tests * trying to fix permission tests * trying to fix permission tests * trying to fix permission tests * trying to fix permission tests * trying to fix permission tests * updates
- Loading branch information
Showing
407 changed files
with
30,337 additions
and
26,192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,5 +17,4 @@ public function getHeaders() | |
{ | ||
return []; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
app/Exceptions/Repositories/InvalidCertificateException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace Gameap\Exceptions\Repositories; | ||
|
||
use Gameap\Exceptions\Http\HttpException; | ||
use Illuminate\Http\Response; | ||
|
||
class InvalidCertificateException extends HttpException | ||
{ | ||
public function getStatusCode() | ||
{ | ||
return Response::HTTP_UNPROCESSABLE_ENTITY; | ||
} | ||
|
||
public function getHeaders() | ||
{ | ||
return []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
|
||
namespace Gameap\Http\Controllers\API; | ||
|
||
use Gameap\Http\Controllers\Controller; | ||
use Illuminate\Foundation\Auth\AuthenticatesUsers; | ||
use Illuminate\Http\Request; | ||
|
||
class AuthController extends Controller | ||
{ | ||
use AuthenticatesUsers; | ||
|
||
/** | ||
* @var Request | ||
*/ | ||
protected $request; | ||
|
||
/** | ||
* The maximum number of attempts to allow. | ||
* @var int | ||
*/ | ||
protected $maxAttempts = 5; | ||
|
||
/** | ||
* Number of minutes to throttle for. | ||
* | ||
* @var int | ||
*/ | ||
protected $decayMinutes = 3; | ||
|
||
/** | ||
* Create a new controller instance. | ||
* | ||
* @param \Illuminate\Http\Request $request | ||
* @return void | ||
*/ | ||
public function __construct(Request $request) | ||
{ | ||
$this->request = $request; | ||
} | ||
|
||
/** | ||
* Get the login username to be used by the controller. | ||
* | ||
* @return string | ||
*/ | ||
public function username() | ||
{ | ||
$field = filter_var($this->request->get('login'), FILTER_VALIDATE_EMAIL) | ||
? 'email' | ||
: 'login'; | ||
|
||
$this->request->merge([$field => $this->request->get('login')]); | ||
|
||
return $field; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?php | ||
|
||
namespace Gameap\Http\Controllers\API; | ||
|
||
use Gameap\Http\Controllers\AuthController; | ||
use Gameap\Http\Requests\ClientCertificatesRequest; | ||
use Gameap\Models\ClientCertificate; | ||
use Gameap\Repositories\ClientCertificateRepository; | ||
|
||
class ClientCertificatesController extends AuthController | ||
{ | ||
/** | ||
* The ClientCertificateRepository instance. | ||
* | ||
* @var \Gameap\Repositories\ClientCertificateRepository | ||
*/ | ||
protected $repository; | ||
|
||
/** | ||
* Create a new ClientCertificatesController instance. | ||
* | ||
* @param \Gameap\Repositories\ClientCertificateRepository $repository | ||
*/ | ||
public function __construct(ClientCertificateRepository $repository) | ||
{ | ||
parent::__construct(); | ||
|
||
$this->repository = $repository; | ||
} | ||
|
||
/** | ||
* Display a listing of the resource. | ||
* | ||
* @return \Illuminate\View\View | ||
*/ | ||
public function list() | ||
{ | ||
$clientCertificates = $this->repository->getAll(99999); | ||
|
||
return $clientCertificates->map(function ($item) { | ||
return $item->only([ | ||
'id', | ||
'fingerprint', | ||
'expires', | ||
'info', | ||
]); | ||
}); | ||
} | ||
|
||
public function store(ClientCertificatesRequest $request) | ||
{ | ||
$this->repository->store($request); | ||
|
||
return ['message' => 'success']; | ||
} | ||
|
||
public function destroy($id) | ||
{ | ||
$clientCertificate = $this->repository->findById($id); | ||
|
||
$this->repository->destroy($clientCertificate); | ||
|
||
return ['message' => 'success']; | ||
} | ||
} |
Oops, something went wrong.