fix: revert ctx→_ctx rename — ctx IS used for auth in server actions
Some checks failed
Workflow / ʦ TypeScript (push) Failing after 6m13s
Workflow / ⚫️ Test (push) Has been skipped

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:
Zaid Marzguioui
2026-04-02 19:30:59 +02:00
parent a1aa1bee86
commit 0932c57fa1
13 changed files with 67 additions and 67 deletions

View File

@@ -15,7 +15,7 @@ import { createBookingManagementApi } from '../api';
export const createBooking = authActionClient
.inputSchema(CreateBookingSchema)
.action(async ({ parsedInput: input, ctx: _ctx }) => {
.action(async ({ parsedInput: input, ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createBookingManagementApi(client);
@@ -33,7 +33,7 @@ export const updateBookingStatus = authActionClient
status: z.string(),
}),
)
.action(async ({ parsedInput: input, ctx: _ctx }) => {
.action(async ({ parsedInput: input, ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createBookingManagementApi(client);
@@ -46,7 +46,7 @@ export const updateBookingStatus = authActionClient
export const createRoom = authActionClient
.inputSchema(CreateRoomSchema)
.action(async ({ parsedInput: input, ctx: _ctx }) => {
.action(async ({ parsedInput: input, ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createBookingManagementApi(client);
@@ -59,7 +59,7 @@ export const createRoom = authActionClient
export const createGuest = authActionClient
.inputSchema(CreateGuestSchema)
.action(async ({ parsedInput: input, ctx: _ctx }) => {
.action(async ({ parsedInput: input, ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createBookingManagementApi(client);