Skip to content

Commit

Permalink
Updated to use Controller attribute (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbyoung committed Sep 20, 2023
1 parent 7af080b commit bdad43a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
branches:
- '*.x'
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
ci:
runs-on: ubuntu-latest
Expand Down
8 changes: 4 additions & 4 deletions src/Auth/Api/Controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@

namespace App\Auth\Api\Controllers;

use Aphiria\Api\Controllers\Controller;
use Aphiria\Api\Controllers\Controller as BaseController;
use Aphiria\Authentication\Attributes\Authenticate;
use Aphiria\Authentication\IAuthenticator;
use Aphiria\Net\Http\IResponse;
use Aphiria\Net\Http\Response;
use Aphiria\Routing\Attributes\Controller;
use Aphiria\Routing\Attributes\Post;
use Aphiria\Routing\Attributes\RouteGroup;
use Exception;

/**
* Defines the auth controller
*/
#[RouteGroup('/auth')]
final class AuthController extends Controller
#[Controller('/auth')]
final class AuthController extends BaseController
{
/**
* @param IAuthenticator $authenticator The authenticator
Expand Down
8 changes: 4 additions & 4 deletions src/Users/Api/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace App\Users\Api\Controllers;

use Aphiria\Api\Controllers\Controller;
use Aphiria\Api\Controllers\Controller as BaseController;
use Aphiria\Authentication\Attributes\Authenticate;
use Aphiria\Authentication\IAuthenticator;
use Aphiria\Authorization\Attributes\AuthorizeRoles;
Expand All @@ -13,10 +13,10 @@
use Aphiria\Authorization\RequirementHandlerNotFoundException;
use Aphiria\Net\Http\HttpException;
use Aphiria\Net\Http\IResponse;
use Aphiria\Routing\Attributes\Controller;
use Aphiria\Routing\Attributes\Delete;
use Aphiria\Routing\Attributes\Get;
use Aphiria\Routing\Attributes\Post;
use Aphiria\Routing\Attributes\RouteGroup;
use App\Users\InvalidPageException;
use App\Users\IUserService;
use App\Users\NewUser;
Expand All @@ -27,8 +27,8 @@
/**
* Defines the user controller
*/
#[RouteGroup('/users')]
final class UserController extends Controller
#[Controller('/users')]
final class UserController extends BaseController
{
/**
* @param IUserService $users The user service
Expand Down

0 comments on commit bdad43a

Please sign in to comment.