Skip to content

Commit d4fa3c3

Browse files
committed
Apply PR finding
1 parent 02248a8 commit d4fa3c3

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

packages/openops/src/lib/openops-tables/create-axios-headers.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { AppSystemProp, system } from '@openops/server-shared';
21
import { AxiosHeaders } from 'axios';
3-
import { TokenOrContext } from './context-helpers';
2+
import { shouldUseDatabaseToken, TokenOrContext } from './context-helpers';
43

54
export enum AuthType {
65
JWT = 'JWT',
@@ -27,10 +26,7 @@ export const createAxiosHeaders = (
2726
const useJwtOverride = typeof contextOrToken === 'string';
2827
const token = getToken(contextOrToken);
2928

30-
const shouldUseDatabaseTokenConfig =
31-
system.getBoolean(AppSystemProp.ENABLE_TABLES_DATABASE_TOKEN) ?? false;
32-
33-
const prefix = getAuthPrefix(useJwtOverride, shouldUseDatabaseTokenConfig);
29+
const prefix = getAuthPrefix(useJwtOverride, shouldUseDatabaseToken());
3430

3531
return new AxiosHeaders({
3632
'Content-Type': 'application/json',

0 commit comments

Comments
 (0)