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:
@@ -15,7 +15,7 @@ import { createFinanceApi } from '../api';
|
||||
|
||||
export const createSepaBatch = authActionClient
|
||||
.inputSchema(CreateSepaBatchSchema)
|
||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
||||
.action(async ({ parsedInput: input, ctx }) => {
|
||||
const client = getSupabaseServerClient();
|
||||
const logger = await getLogger();
|
||||
const api = createFinanceApi(client);
|
||||
@@ -29,7 +29,7 @@ export const createSepaBatch = authActionClient
|
||||
|
||||
export const addSepaItem = authActionClient
|
||||
.inputSchema(AddSepaItemSchema)
|
||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
||||
.action(async ({ parsedInput: input, ctx }) => {
|
||||
const client = getSupabaseServerClient();
|
||||
const logger = await getLogger();
|
||||
const api = createFinanceApi(client);
|
||||
@@ -51,7 +51,7 @@ export const generateSepaXml = authActionClient
|
||||
creditorId: z.string(),
|
||||
}),
|
||||
)
|
||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
||||
.action(async ({ parsedInput: input, ctx }) => {
|
||||
const client = getSupabaseServerClient();
|
||||
const logger = await getLogger();
|
||||
const api = createFinanceApi(client);
|
||||
@@ -76,7 +76,7 @@ export const generateSepaXml = authActionClient
|
||||
|
||||
export const createInvoice = authActionClient
|
||||
.inputSchema(CreateInvoiceSchema)
|
||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
||||
.action(async ({ parsedInput: input, ctx }) => {
|
||||
const client = getSupabaseServerClient();
|
||||
const logger = await getLogger();
|
||||
const api = createFinanceApi(client);
|
||||
|
||||
Reference in New Issue
Block a user