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()
|
|
|
|
{
|
2024-03-27 10:07:29 +00:00
|
|
|
return response()->json(['error' => 'Invalid token.', 'docs' => 'https://coolify.io/docs/api-reference/authorization'], 400);
|
2024-03-07 11:27:23 +00:00
|
|
|
}
|