diff --git a/app/Http/Controllers/API/Settings/AccessTokenController.php b/app/Http/Controllers/API/Settings/AccessTokenController.php index d903090e..6cb5b91e 100644 --- a/app/Http/Controllers/API/Settings/AccessTokenController.php +++ b/app/Http/Controllers/API/Settings/AccessTokenController.php @@ -29,6 +29,10 @@ public function index() */ public function create(Request $request) { + validate([ + 'name' => 'required|unique:access_tokens,name', + ]); + $token = Str::uuid(); AccessToken::create([ 'user_id' => auth('api')->user()->id,