mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-11 01:24:46 +02:00
fix: flag only usernames through the moderation rule (#1188)
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
name: GraphQL Schema
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
graphql:
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.5'
|
||||
tools: dom, curl, libxml, mbstring, zip, pcntl, pdo
|
||||
- uses: actions/checkout@v3
|
||||
- name: Copy .env
|
||||
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
|
||||
- name: Directory Permissions
|
||||
run: chmod -R 777 storage bootstrap/cache
|
||||
- name: Validate GraphQL Schema via Lighthouse
|
||||
run: |
|
||||
php artisan lighthouse:validate-schema
|
||||
@@ -1,6 +1,7 @@
|
||||
<p align="center">
|
||||
<a href="https://github.com/AnimeThemes/animethemes-server/actions/workflows/test.yml"><img src="https://github.com/AnimeThemes/animethemes-server/actions/workflows/test.yml/badge.svg?branch=main" alt="tests"></a>
|
||||
<a href="https://github.com/AnimeThemes/animethemes-server/actions/workflows/static-analysis.yml"><img src="https://github.com/AnimeThemes/animethemes-server/actions/workflows/static-analysis.yml/badge.svg?branch=main" alt="static-analysis"></a>
|
||||
<a href="https://github.com/AnimeThemes/animethemes-server/actions/workflows/graphql.yml"><img src="https://github.com/AnimeThemes/animethemes-server/actions/workflows/graphql.yml/badge.svg?branch=main" alt="graphql"></a>
|
||||
<a href="https://github.styleci.io/repos/111264405?branch=main"><img src="https://github.styleci.io/repos/111264405/shield?branch=main" alt="StyleCI"></a>
|
||||
<a href="https://discordapp.com/invite/m9zbVyQ"><img src="https://img.shields.io/discord/354388306580078594.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2"></a>
|
||||
<a href="https://github.com/AnimeThemes/animethemes-server/blob/main/LICENSE"><img src="https://img.shields.io/github/license/AnimeThemes/animethemes-server"></a>
|
||||
|
||||
@@ -5,7 +5,6 @@ declare(strict_types=1);
|
||||
namespace App\GraphQL\Validators\List;
|
||||
|
||||
use App\Enums\Models\List\PlaylistVisibility;
|
||||
use App\Rules\ModerationRule;
|
||||
use Illuminate\Validation\Rules\Enum;
|
||||
use Nuwave\Lighthouse\Validation\Validator;
|
||||
|
||||
@@ -23,7 +22,6 @@ class CreatePlaylistMutationValidator extends Validator
|
||||
'required',
|
||||
'string',
|
||||
'max:192',
|
||||
new ModerationRule(),
|
||||
],
|
||||
'visibility' => [
|
||||
'required',
|
||||
|
||||
@@ -5,7 +5,6 @@ declare(strict_types=1);
|
||||
namespace App\GraphQL\Validators\List;
|
||||
|
||||
use App\Enums\Models\List\PlaylistVisibility;
|
||||
use App\Rules\ModerationRule;
|
||||
use Illuminate\Validation\Rules\Enum;
|
||||
use Nuwave\Lighthouse\Validation\Validator;
|
||||
|
||||
@@ -24,7 +23,6 @@ class UpdatePlaylistMutationValidator extends Validator
|
||||
'required',
|
||||
'string',
|
||||
'max:192',
|
||||
new ModerationRule(),
|
||||
],
|
||||
'visibility' => [
|
||||
'sometimes',
|
||||
|
||||
@@ -9,7 +9,6 @@ use App\Contracts\Http\Api\Field\UpdatableField;
|
||||
use App\Http\Api\Field\StringField;
|
||||
use App\Http\Api\Schema\Schema;
|
||||
use App\Models\List\Playlist;
|
||||
use App\Rules\ModerationRule;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class PlaylistNameField extends StringField implements CreatableField, UpdatableField
|
||||
@@ -25,7 +24,6 @@ class PlaylistNameField extends StringField implements CreatableField, Updatable
|
||||
'required',
|
||||
'string',
|
||||
'max:192',
|
||||
new ModerationRule(),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -36,7 +34,6 @@ class PlaylistNameField extends StringField implements CreatableField, Updatable
|
||||
'required',
|
||||
'string',
|
||||
'max:192',
|
||||
new ModerationRule(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user