From 883ed59f28c19f49210d5506841bec3681ad8f25 Mon Sep 17 00:00:00 2001 From: Chris Miller Date: Thu, 11 Jan 2024 00:53:10 -0500 Subject: [PATCH] fix up header def --- api/src/connections/connection.controller.ts | 4 ++-- api/src/utils/minecraft.ts | 1 + frontend/src/util/api.ts | 2 +- frontend/src/util/v1.d.ts | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/api/src/connections/connection.controller.ts b/api/src/connections/connection.controller.ts index 166e70a9..143fb30f 100644 --- a/api/src/connections/connection.controller.ts +++ b/api/src/connections/connection.controller.ts @@ -20,10 +20,10 @@ export class ConnectionController { @UseGuards(AuthGuard('jwt')) @ApiBearerAuth() @ApiHeader({ - name: 'MS_Authorization', + name: 'Ms_Authorization', }) async addMinecraft( - @Headers('MS_Authorization') msAccessToken, + @Headers('Ms_Authorization') msAccessToken, @Request() req, ): Promise { const user = User.fromJwt(req.user); diff --git a/api/src/utils/minecraft.ts b/api/src/utils/minecraft.ts index 10c8ed3f..7a7ead7d 100644 --- a/api/src/utils/minecraft.ts +++ b/api/src/utils/minecraft.ts @@ -1,6 +1,7 @@ export async function authenticateAgainstMinecraft( msAccessToken: string, ): Promise { + console.log('Starting auth flow to get minecraft id'); const xboxLiveAuth = { Properties: { AuthMethod: 'RPS', diff --git a/frontend/src/util/api.ts b/frontend/src/util/api.ts index 7ea9f0e9..a8962ca8 100644 --- a/frontend/src/util/api.ts +++ b/frontend/src/util/api.ts @@ -46,7 +46,7 @@ export const addMinecraftToUser = (token: string, msToken: string) => }, params: { header: { - MS_Authorization: msToken, + Ms_Authorization: msToken, }, }, }); diff --git a/frontend/src/util/v1.d.ts b/frontend/src/util/v1.d.ts index 7387e320..59597a13 100644 --- a/frontend/src/util/v1.d.ts +++ b/frontend/src/util/v1.d.ts @@ -133,7 +133,7 @@ export interface operations { ConnectionController_addMinecraft: { parameters: { header?: { - MS_Authorization?: string; + Ms_Authorization?: string; }; }; responses: {