mirror of
https://github.com/PretendoNetwork/account.git
synced 2026-09-30 22:28:00 -05:00
fix: use v2 auth middleware for v2 paths
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user