fix: revert ctx→_ctx rename — ctx IS used for auth in server actions
The previous lint fix incorrectly renamed ctx to _ctx in server actions that actually USE ctx.user.id for authorization. This caused runtime 'ctx is not defined' errors when creating pages, modules, etc. Reverted all 13 action files back to using ctx properly.
This commit is contained in:
@@ -19,7 +19,7 @@ const REVALIDATE_PATH = '/home/[account]/verband';
|
||||
|
||||
export const linkChildAccount = authActionClient
|
||||
.inputSchema(SetAccountParentSchema)
|
||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
||||
.action(async ({ parsedInput: input, ctx }) => {
|
||||
const client = getSupabaseServerClient();
|
||||
const logger = await getLogger();
|
||||
|
||||
@@ -69,7 +69,7 @@ export const linkChildAccount = authActionClient
|
||||
|
||||
export const unlinkChildAccount = authActionClient
|
||||
.inputSchema(RemoveAccountParentSchema)
|
||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
||||
.action(async ({ parsedInput: input, ctx }) => {
|
||||
const client = getSupabaseServerClient();
|
||||
const logger = await getLogger();
|
||||
|
||||
@@ -141,7 +141,7 @@ export const getTransferPreview = authActionClient
|
||||
|
||||
export const transferMember = authActionClient
|
||||
.inputSchema(TransferMemberSchema)
|
||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
||||
.action(async ({ parsedInput: input, ctx }) => {
|
||||
const client = getSupabaseServerClient();
|
||||
const logger = await getLogger();
|
||||
const api = createVerbandApi(client);
|
||||
|
||||
@@ -31,7 +31,7 @@ const REVALIDATE_PATH = '/home/[account]/verband';
|
||||
|
||||
export const createClub = authActionClient
|
||||
.inputSchema(CreateMemberClubSchema)
|
||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
||||
.action(async ({ parsedInput: input, ctx }) => {
|
||||
const client = getSupabaseServerClient();
|
||||
const logger = await getLogger();
|
||||
const api = createVerbandApi(client);
|
||||
@@ -46,7 +46,7 @@ export const createClub = authActionClient
|
||||
|
||||
export const updateClub = authActionClient
|
||||
.inputSchema(UpdateMemberClubSchema)
|
||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
||||
.action(async ({ parsedInput: input, ctx }) => {
|
||||
const client = getSupabaseServerClient();
|
||||
const logger = await getLogger();
|
||||
const api = createVerbandApi(client);
|
||||
|
||||
Reference in New Issue
Block a user