mirror of
https://github.com/valitydev/control-center.git
synced 2024-11-06 02:25:17 +00:00
change wachterServiceName to claim management service
This commit is contained in:
parent
afb9894e92
commit
388b1580e4
@ -9,6 +9,7 @@ const THRIFT_PROXY_CONFIG = {
|
||||
'/file_storage',
|
||||
'/deanonimus',
|
||||
'/payout/management',
|
||||
'/wachter',
|
||||
],
|
||||
target: process.env.PROXY_TARGET,
|
||||
secure: false,
|
||||
|
@ -13,7 +13,8 @@ export class ClaimManagementService extends createThriftApi<CodegenClient>() {
|
||||
constructor(injector: Injector) {
|
||||
super(injector, {
|
||||
service,
|
||||
path: '/v1/cm',
|
||||
wachterServiceName: 'claimManagement',
|
||||
path: '/wachter',
|
||||
metadata: () => import('@vality/domain-proto/lib/metadata.json').then((m) => m.default),
|
||||
context,
|
||||
...codegenClientConfig,
|
||||
|
@ -3,6 +3,7 @@ export interface ThriftApiOptions {
|
||||
service: object;
|
||||
serviceName: string;
|
||||
path: string;
|
||||
wachterServiceName?: string;
|
||||
hostname?: string;
|
||||
port?: string;
|
||||
metadata: () => Promise<any>;
|
||||
|
@ -38,7 +38,11 @@ export class ThriftConnector {
|
||||
this.options.port || location.port,
|
||||
this.options.path,
|
||||
this.options.service,
|
||||
toConnectOptions(token, this.options.deprecatedHeaders),
|
||||
toConnectOptions(
|
||||
token,
|
||||
this.options.wachterServiceName,
|
||||
this.options.deprecatedHeaders
|
||||
),
|
||||
(err) => {
|
||||
observer.error(err);
|
||||
observer.complete();
|
||||
|
@ -18,6 +18,7 @@ const toHeaders = (email: string, username: string, partyID: string, realm: stri
|
||||
|
||||
export const toConnectOptions = (
|
||||
{ email, sub, preferred_username }: KeycloakToken,
|
||||
serviceName: string,
|
||||
deprecatedHeaders = false,
|
||||
realm = 'internal'
|
||||
): ConnectOptions => ({
|
||||
@ -26,6 +27,8 @@ export const toConnectOptions = (
|
||||
...(deprecatedHeaders
|
||||
? toDepricatedHeaders(email, preferred_username, sub, realm)
|
||||
: undefined),
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
...(serviceName ? { Service: serviceName } : {}),
|
||||
},
|
||||
deadlineConfig: {
|
||||
amount: 3,
|
||||
|
Loading…
Reference in New Issue
Block a user