1 parent
badf5f2c81
commit
aaddfc7bfc
44 files changed
+1331
-867
No files matched your search
@@ -15,10 +15,9 @@
|
||||
*/
|
||||
import type { NextApiRequest } from 'next';
|
||||
|
||||
type StoredJwt = { accessToken?: string };
|
||||
import { supportExternalUrl } from './support-external';
|
||||
|
||||
const supportApiBaseUrl =
|
||||
process.env.SUPPORT_API_BASE_URL ?? 'http://127.0.0.1:8010';
|
||||
type StoredJwt = { accessToken?: string };
|
||||
|
||||
export interface SupportPrincipal {
|
||||
user_id: string;
|
||||
@@ -88,7 +87,7 @@ export const getSupportPrincipal = async (
|
||||
if (!headers.Authorization) return null;
|
||||
|
||||
try {
|
||||
const response = await fetch(`${supportApiBaseUrl}/api/access/me`, {
|
||||
const response = await fetch(supportExternalUrl('/access'), {
|
||||
headers,
|
||||
});
|
||||
if (!response.ok) return null;
|
||||
|
||||
Reference in new issue
Block a user