fix: use v2 auth middleware for v2 paths

This commit is contained in:
limes
2026-08-29 16:35:19 +02:00
parent 7f9d91b3b7
commit dfe17a2bf2
5 changed files with 5 additions and 5 deletions

View File

@@ -2,7 +2,7 @@ import { config } from '@/config-manager';
import type { CallContext } from 'nice-grpc';
import type { GetUserDataResponse, DeepPartial } from '@pretendonetwork/grpc/api/v2/get_user_data_rpc';
import type { Empty } from '@pretendonetwork/grpc/google/protobuf/empty';
import type { AuthenticationCallContextExt } from '@/services/grpc/api/v1/authentication-middleware';
import type { AuthenticationCallContextExt } from '@/services/grpc/api/v2/authentication-middleware';
export async function getUserData(_request: Empty, context: CallContext & AuthenticationCallContextExt): Promise<DeepPartial<GetUserDataResponse>> {
// * This is asserted in authentication-middleware, we know this is never null

View File

@@ -1,7 +1,7 @@
import { Status, ServerError } from 'nice-grpc';
import type { CallContext } from 'nice-grpc';
import type { SetDiscordConnectionDataRequest, SetDiscordConnectionDataResponse } from '@pretendonetwork/grpc/api/v2/set_discord_connection_data_rpc';
import type { AuthenticationCallContextExt } from '@/services/grpc/api/v1/authentication-middleware';
import type { AuthenticationCallContextExt } from '@/services/grpc/api/v2/authentication-middleware';
export async function setDiscordConnectionData(request: SetDiscordConnectionDataRequest, context: CallContext & AuthenticationCallContextExt): Promise<SetDiscordConnectionDataResponse> {
// * This is asserted in authentication-middleware, we know this is never null

View File

@@ -2,7 +2,7 @@ import { Status, ServerError } from 'nice-grpc';
import { PNID } from '@/models/pnid';
import type { CallContext } from 'nice-grpc';
import type { SetStripeConnectionDataRequest, SetStripeConnectionDataResponse } from '@pretendonetwork/grpc/api/v2/set_stripe_connection_data_rpc';
import type { AuthenticationCallContextExt } from '@/services/grpc/api/v1/authentication-middleware';
import type { AuthenticationCallContextExt } from '@/services/grpc/api/v2/authentication-middleware';
type StripeMongoUpdateScheme = {
'access_level'?: number;

View File

@@ -7,7 +7,7 @@ import type {
UpdateEmailRequest,
UpdateEmailResponse
} from '@pretendonetwork/grpc/api/v2/update_email_rpc';
import type { AuthenticationCallContextExt } from '@/services/grpc/api/v1/authentication-middleware';
import type { AuthenticationCallContextExt } from '@/services/grpc/api/v2/authentication-middleware';
export async function updateEmail(
request: UpdateEmailRequest,

View File

@@ -10,7 +10,7 @@ import type {
DeepPartial
} from '@pretendonetwork/grpc/api/v2/update_user_data_rpc';
import type { GetUserDataResponse } from '@pretendonetwork/grpc/api/v2/get_user_data_rpc';
import type { AuthenticationCallContextExt } from '@/services/grpc/api/v1/authentication-middleware';
import type { AuthenticationCallContextExt } from '@/services/grpc/api/v2/authentication-middleware';
export async function updateUserData(
request: UpdateUserDataRequest,