2024-02-16 20:56:38 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
function get_team_id_from_token()
|
|
|
|
{
|
|
|
|
$token = auth()->user()->currentAccessToken();
|
|
|
|
return data_get($token, 'team_id');
|
|
|
|
}
|
2024-03-07 11:27:23 +00:00
|
|
|
function invalid_token()
|
|
|
|
{
|
|
|
|
return response()->json(['error' => 'Invalid token.', 'docs' => 'https://coolify.io/docs/api/authentication'], 400);
|
|
|
|
}
|