@@ -17,10 +17,10 @@ import type { ParamPack } from '@/types/common/param-pack';
1717import type { Token } from '@/types/common/token' ;
1818
1919// * nice-grpc doesn't export ChannelImplementation so this can't be typed
20- const gRPCFriendsChannel = createChannel ( `${ config . grpc . friends . ip } :${ config . grpc . friends . port } ` ) ;
20+ const gRPCFriendsChannel = createChannel ( `${ config . grpc . friends . host } :${ config . grpc . friends . port } ` ) ;
2121const gRPCFriendsClient = createClient ( FriendsDefinition , gRPCFriendsChannel ) ;
2222
23- const gRPCAccountChannel = createChannel ( `${ config . grpc . account . ip } :${ config . grpc . account . port } ` ) ;
23+ const gRPCAccountChannel = createChannel ( `${ config . grpc . account . host } :${ config . grpc . account . port } ` ) ;
2424const gRPCAccountClient = createClient ( AccountDefinition , gRPCAccountChannel ) ;
2525
2626const s3 = new aws . S3 ( {
@@ -80,7 +80,7 @@ export function decryptToken(token: Buffer): Buffer {
8080 const expectedChecksum = token . readUint32BE ( ) ;
8181 const encryptedBody = token . subarray ( 4 ) ;
8282
83- const decipher = crypto . createDecipheriv ( 'aes-256-cbc' , Buffer . from ( config . aes_key , 'hex' ) , iv ) ;
83+ const decipher = crypto . createDecipheriv ( 'aes-256-cbc' , Buffer . from ( config . aesKey , 'hex' ) , iv ) ;
8484
8585 const decrypted = Buffer . concat ( [
8686 decipher . update ( encryptedBody ) ,
@@ -166,7 +166,7 @@ export async function getUserFriendPIDs(pid: number): Promise<number[]> {
166166 pid : pid
167167 } , {
168168 metadata : Metadata ( {
169- 'X-API-Key' : config . grpc . friends . api_key
169+ 'X-API-Key' : config . grpc . friends . apiKey
170170 } )
171171 } ) ;
172172
@@ -178,7 +178,7 @@ export async function getUserFriendRequestsIncoming(pid: number): Promise<Friend
178178 pid : pid
179179 } , {
180180 metadata : Metadata ( {
181- 'X-API-Key' : config . grpc . friends . api_key
181+ 'X-API-Key' : config . grpc . friends . apiKey
182182 } )
183183 } ) ;
184184
@@ -190,7 +190,7 @@ export function getUserAccountData(pid: number): Promise<GetUserDataResponse> {
190190 pid : pid
191191 } , {
192192 metadata : Metadata ( {
193- 'X-API-Key' : config . grpc . account . api_key
193+ 'X-API-Key' : config . grpc . account . apiKey
194194 } )
195195 } ) ;
196196}
0 commit comments