lasthourcloud/bootstrap/helpers/api.php

13 lines
296 B
PHP
Raw Normal View History

<?php
function get_team_id_from_token()
{
$token = auth()->user()->currentAccessToken();
2024-06-10 20:43:34 +00:00
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
}