mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-19 00:01:00 +08:00
API bookmark
This commit is contained in:
@@ -37,7 +37,7 @@ class TokenController extends Controller
|
||||
$newAccessToken = $user->createToken($request->name, $request->permissions);
|
||||
$tokenText = $newAccessToken->plainTextToken;
|
||||
$msg = nexus_trans("token.create_success_tip", ['token' => $tokenText]);
|
||||
return $this->successJsonResource(['token' => $tokenText], $msg);
|
||||
return $this->success(['token' => $tokenText], $msg);
|
||||
} catch (\Exception $exception) {
|
||||
return $this->fail(false, $exception->getMessage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user