mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-11 01:24:46 +02:00
feat(api): remove guard name fields (#1168)
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\GraphQL\Schema\Fields\Auth\Permission;
|
||||
|
||||
use App\GraphQL\Schema\Fields\StringField;
|
||||
use App\Models\Auth\Permission;
|
||||
|
||||
class PermissionGuardNameField extends StringField
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(Permission::ATTRIBUTE_GUARD_NAME, 'guardName', nullable: false);
|
||||
}
|
||||
|
||||
public function description(): string
|
||||
{
|
||||
return 'The authentication guard of the resource';
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\GraphQL\Schema\Fields\Auth\Role;
|
||||
|
||||
use App\GraphQL\Schema\Fields\StringField;
|
||||
use App\Models\Auth\Role;
|
||||
|
||||
class RoleGuardNameField extends StringField
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(Role::ATTRIBUTE_GUARD_NAME, 'guardName', nullable: false);
|
||||
}
|
||||
|
||||
public function description(): string
|
||||
{
|
||||
return 'The authentication guard of the resource';
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\GraphQL\Schema\Types\Auth;
|
||||
|
||||
use App\GraphQL\Schema\Fields\Auth\Permission\PermissionGuardNameField;
|
||||
use App\GraphQL\Schema\Fields\Auth\Permission\PermissionNameField;
|
||||
use App\GraphQL\Schema\Fields\Base\CreatedAtField;
|
||||
use App\GraphQL\Schema\Fields\Base\IdField;
|
||||
@@ -30,7 +29,6 @@ class PermissionType extends EloquentType
|
||||
return [
|
||||
new IdField(Permission::ATTRIBUTE_ID, Permission::class),
|
||||
new PermissionNameField(),
|
||||
new PermissionGuardNameField(),
|
||||
new CreatedAtField(),
|
||||
new UpdatedAtField(),
|
||||
];
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace App\GraphQL\Schema\Types\Auth;
|
||||
|
||||
use App\GraphQL\Schema\Fields\Auth\Role\RoleColorField;
|
||||
use App\GraphQL\Schema\Fields\Auth\Role\RoleDefaultField;
|
||||
use App\GraphQL\Schema\Fields\Auth\Role\RoleGuardNameField;
|
||||
use App\GraphQL\Schema\Fields\Auth\Role\RoleNameField;
|
||||
use App\GraphQL\Schema\Fields\Auth\Role\RolePriorityField;
|
||||
use App\GraphQL\Schema\Fields\Base\CreatedAtField;
|
||||
@@ -36,7 +35,6 @@ class RoleType extends EloquentType
|
||||
new RoleNameField(),
|
||||
new RoleColorField(),
|
||||
new RoleDefaultField(),
|
||||
new RoleGuardNameField(),
|
||||
new RolePriorityField(),
|
||||
new CreatedAtField(),
|
||||
new UpdatedAtField(),
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Api\Field\Auth\Permission;
|
||||
|
||||
use App\Http\Api\Field\StringField;
|
||||
use App\Http\Api\Schema\Schema;
|
||||
use App\Models\Auth\Permission;
|
||||
|
||||
class PermissionGuardNameField extends StringField
|
||||
{
|
||||
public function __construct(Schema $schema)
|
||||
{
|
||||
parent::__construct($schema, Permission::ATTRIBUTE_GUARD_NAME);
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Api\Field\Auth\Role;
|
||||
|
||||
use App\Http\Api\Field\StringField;
|
||||
use App\Http\Api\Schema\Schema;
|
||||
use App\Models\Auth\Role;
|
||||
|
||||
class RoleGuardNameField extends StringField
|
||||
{
|
||||
public function __construct(Schema $schema)
|
||||
{
|
||||
parent::__construct($schema, Role::ATTRIBUTE_GUARD_NAME);
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Api\Schema\Auth;
|
||||
|
||||
use App\Http\Api\Field\Auth\Permission\PermissionGuardNameField;
|
||||
use App\Http\Api\Field\Auth\Permission\PermissionNameField;
|
||||
use App\Http\Api\Field\Base\CreatedAtField;
|
||||
use App\Http\Api\Field\Base\IdField;
|
||||
@@ -42,7 +41,6 @@ class PermissionSchema extends EloquentSchema
|
||||
new UpdatedAtField($this),
|
||||
new IdField($this, Permission::ATTRIBUTE_ID),
|
||||
new PermissionNameField($this),
|
||||
new PermissionGuardNameField($this),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace App\Http\Api\Schema\Auth;
|
||||
|
||||
use App\Http\Api\Field\Auth\Role\RoleColorField;
|
||||
use App\Http\Api\Field\Auth\Role\RoleDefaultField;
|
||||
use App\Http\Api\Field\Auth\Role\RoleGuardNameField;
|
||||
use App\Http\Api\Field\Auth\Role\RoleNameField;
|
||||
use App\Http\Api\Field\Auth\Role\RolePriorityField;
|
||||
use App\Http\Api\Field\Base\CreatedAtField;
|
||||
@@ -47,7 +46,6 @@ class RoleSchema extends EloquentSchema
|
||||
new UpdatedAtField($this),
|
||||
new IdField($this, Role::ATTRIBUTE_ID),
|
||||
new RoleNameField($this),
|
||||
new RoleGuardNameField($this),
|
||||
new RoleDefaultField($this),
|
||||
new RoleColorField($this),
|
||||
new RolePriorityField($this),
|
||||
|
||||
Reference in New Issue
Block a user