lasthourcloud/bootstrap/helpers/api.php

12 lines
295 B
PHP
Raw Normal View History

<?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
}