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 { createBookingManagementApi } from '../api';
|
|||||||
|
|
||||||
export const createBooking = authActionClient
|
export const createBooking = authActionClient
|
||||||
.inputSchema(CreateBookingSchema)
|
.inputSchema(CreateBookingSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createBookingManagementApi(client);
|
const api = createBookingManagementApi(client);
|
||||||
@@ -33,7 +33,7 @@ export const updateBookingStatus = authActionClient
|
|||||||
status: z.string(),
|
status: z.string(),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createBookingManagementApi(client);
|
const api = createBookingManagementApi(client);
|
||||||
@@ -46,7 +46,7 @@ export const updateBookingStatus = authActionClient
|
|||||||
|
|
||||||
export const createRoom = authActionClient
|
export const createRoom = authActionClient
|
||||||
.inputSchema(CreateRoomSchema)
|
.inputSchema(CreateRoomSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createBookingManagementApi(client);
|
const api = createBookingManagementApi(client);
|
||||||
@@ -59,7 +59,7 @@ export const createRoom = authActionClient
|
|||||||
|
|
||||||
export const createGuest = authActionClient
|
export const createGuest = authActionClient
|
||||||
.inputSchema(CreateGuestSchema)
|
.inputSchema(CreateGuestSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createBookingManagementApi(client);
|
const api = createBookingManagementApi(client);
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import { createCourseManagementApi } from '../api';
|
|||||||
|
|
||||||
export const createCourse = authActionClient
|
export const createCourse = authActionClient
|
||||||
.inputSchema(CreateCourseSchema)
|
.inputSchema(CreateCourseSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createCourseManagementApi(client);
|
const api = createCourseManagementApi(client);
|
||||||
@@ -32,7 +32,7 @@ export const createCourse = authActionClient
|
|||||||
|
|
||||||
export const updateCourse = authActionClient
|
export const updateCourse = authActionClient
|
||||||
.inputSchema(UpdateCourseSchema)
|
.inputSchema(UpdateCourseSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createCourseManagementApi(client);
|
const api = createCourseManagementApi(client);
|
||||||
@@ -45,7 +45,7 @@ export const updateCourse = authActionClient
|
|||||||
|
|
||||||
export const deleteCourse = authActionClient
|
export const deleteCourse = authActionClient
|
||||||
.inputSchema(z.object({ courseId: z.string().uuid() }))
|
.inputSchema(z.object({ courseId: z.string().uuid() }))
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createCourseManagementApi(client);
|
const api = createCourseManagementApi(client);
|
||||||
@@ -58,7 +58,7 @@ export const deleteCourse = authActionClient
|
|||||||
|
|
||||||
export const enrollParticipant = authActionClient
|
export const enrollParticipant = authActionClient
|
||||||
.inputSchema(EnrollParticipantSchema)
|
.inputSchema(EnrollParticipantSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createCourseManagementApi(client);
|
const api = createCourseManagementApi(client);
|
||||||
@@ -78,7 +78,7 @@ export const cancelEnrollment = authActionClient
|
|||||||
participantId: z.string().uuid(),
|
participantId: z.string().uuid(),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createCourseManagementApi(client);
|
const api = createCourseManagementApi(client);
|
||||||
@@ -100,7 +100,7 @@ export const markAttendance = authActionClient
|
|||||||
present: z.boolean(),
|
present: z.boolean(),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createCourseManagementApi(client);
|
const api = createCourseManagementApi(client);
|
||||||
@@ -117,7 +117,7 @@ export const markAttendance = authActionClient
|
|||||||
|
|
||||||
export const createCategory = authActionClient
|
export const createCategory = authActionClient
|
||||||
.inputSchema(CreateCategorySchema)
|
.inputSchema(CreateCategorySchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createCourseManagementApi(client);
|
const api = createCourseManagementApi(client);
|
||||||
@@ -130,7 +130,7 @@ export const createCategory = authActionClient
|
|||||||
|
|
||||||
export const createInstructor = authActionClient
|
export const createInstructor = authActionClient
|
||||||
.inputSchema(CreateInstructorSchema)
|
.inputSchema(CreateInstructorSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createCourseManagementApi(client);
|
const api = createCourseManagementApi(client);
|
||||||
@@ -143,7 +143,7 @@ export const createInstructor = authActionClient
|
|||||||
|
|
||||||
export const createLocation = authActionClient
|
export const createLocation = authActionClient
|
||||||
.inputSchema(CreateLocationSchema)
|
.inputSchema(CreateLocationSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createCourseManagementApi(client);
|
const api = createCourseManagementApi(client);
|
||||||
@@ -156,7 +156,7 @@ export const createLocation = authActionClient
|
|||||||
|
|
||||||
export const createSession = authActionClient
|
export const createSession = authActionClient
|
||||||
.inputSchema(CreateSessionSchema)
|
.inputSchema(CreateSessionSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createCourseManagementApi(client);
|
const api = createCourseManagementApi(client);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import { createEventManagementApi } from '../api';
|
|||||||
|
|
||||||
export const createEvent = authActionClient
|
export const createEvent = authActionClient
|
||||||
.inputSchema(CreateEventSchema)
|
.inputSchema(CreateEventSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createEventManagementApi(client);
|
const api = createEventManagementApi(client);
|
||||||
@@ -29,7 +29,7 @@ export const createEvent = authActionClient
|
|||||||
|
|
||||||
export const updateEvent = authActionClient
|
export const updateEvent = authActionClient
|
||||||
.inputSchema(UpdateEventSchema)
|
.inputSchema(UpdateEventSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createEventManagementApi(client);
|
const api = createEventManagementApi(client);
|
||||||
@@ -42,7 +42,7 @@ export const updateEvent = authActionClient
|
|||||||
|
|
||||||
export const deleteEvent = authActionClient
|
export const deleteEvent = authActionClient
|
||||||
.inputSchema(z.object({ eventId: z.string().uuid() }))
|
.inputSchema(z.object({ eventId: z.string().uuid() }))
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createEventManagementApi(client);
|
const api = createEventManagementApi(client);
|
||||||
@@ -55,7 +55,7 @@ export const deleteEvent = authActionClient
|
|||||||
|
|
||||||
export const registerForEvent = authActionClient
|
export const registerForEvent = authActionClient
|
||||||
.inputSchema(EventRegistrationSchema)
|
.inputSchema(EventRegistrationSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createEventManagementApi(client);
|
const api = createEventManagementApi(client);
|
||||||
@@ -68,7 +68,7 @@ export const registerForEvent = authActionClient
|
|||||||
|
|
||||||
export const createHolidayPass = authActionClient
|
export const createHolidayPass = authActionClient
|
||||||
.inputSchema(CreateHolidayPassSchema)
|
.inputSchema(CreateHolidayPassSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createEventManagementApi(client);
|
const api = createEventManagementApi(client);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import { createFinanceApi } from '../api';
|
|||||||
|
|
||||||
export const createSepaBatch = authActionClient
|
export const createSepaBatch = authActionClient
|
||||||
.inputSchema(CreateSepaBatchSchema)
|
.inputSchema(CreateSepaBatchSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createFinanceApi(client);
|
const api = createFinanceApi(client);
|
||||||
@@ -29,7 +29,7 @@ export const createSepaBatch = authActionClient
|
|||||||
|
|
||||||
export const addSepaItem = authActionClient
|
export const addSepaItem = authActionClient
|
||||||
.inputSchema(AddSepaItemSchema)
|
.inputSchema(AddSepaItemSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createFinanceApi(client);
|
const api = createFinanceApi(client);
|
||||||
@@ -51,7 +51,7 @@ export const generateSepaXml = authActionClient
|
|||||||
creditorId: z.string(),
|
creditorId: z.string(),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createFinanceApi(client);
|
const api = createFinanceApi(client);
|
||||||
@@ -76,7 +76,7 @@ export const generateSepaXml = authActionClient
|
|||||||
|
|
||||||
export const createInvoice = authActionClient
|
export const createInvoice = authActionClient
|
||||||
.inputSchema(CreateInvoiceSchema)
|
.inputSchema(CreateInvoiceSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createFinanceApi(client);
|
const api = createFinanceApi(client);
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ import { createFischereiApi } from '../api';
|
|||||||
|
|
||||||
export const createWater = authActionClient
|
export const createWater = authActionClient
|
||||||
.inputSchema(CreateWaterSchema)
|
.inputSchema(CreateWaterSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createFischereiApi(client);
|
const api = createFischereiApi(client);
|
||||||
@@ -54,7 +54,7 @@ export const createWater = authActionClient
|
|||||||
|
|
||||||
export const updateWater = authActionClient
|
export const updateWater = authActionClient
|
||||||
.inputSchema(UpdateWaterSchema)
|
.inputSchema(UpdateWaterSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createFischereiApi(client);
|
const api = createFischereiApi(client);
|
||||||
@@ -191,7 +191,7 @@ export const deleteWaterSpeciesRule = authActionClient
|
|||||||
|
|
||||||
export const createStocking = authActionClient
|
export const createStocking = authActionClient
|
||||||
.inputSchema(CreateStockingSchema)
|
.inputSchema(CreateStockingSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createFischereiApi(client);
|
const api = createFischereiApi(client);
|
||||||
@@ -212,7 +212,7 @@ export const createStocking = authActionClient
|
|||||||
|
|
||||||
export const updateStocking = authActionClient
|
export const updateStocking = authActionClient
|
||||||
.inputSchema(UpdateStockingSchema)
|
.inputSchema(UpdateStockingSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createFischereiApi(client);
|
const api = createFischereiApi(client);
|
||||||
@@ -262,7 +262,7 @@ export const deleteStocking = authActionClient
|
|||||||
|
|
||||||
export const createLease = authActionClient
|
export const createLease = authActionClient
|
||||||
.inputSchema(CreateLeaseSchema)
|
.inputSchema(CreateLeaseSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createFischereiApi(client);
|
const api = createFischereiApi(client);
|
||||||
@@ -277,7 +277,7 @@ export const createLease = authActionClient
|
|||||||
|
|
||||||
export const updateLease = authActionClient
|
export const updateLease = authActionClient
|
||||||
.inputSchema(UpdateLeaseSchema)
|
.inputSchema(UpdateLeaseSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createFischereiApi(client);
|
const api = createFischereiApi(client);
|
||||||
@@ -315,7 +315,7 @@ export const deleteLease = authActionClient
|
|||||||
|
|
||||||
export const createCatchBook = authActionClient
|
export const createCatchBook = authActionClient
|
||||||
.inputSchema(CreateCatchBookSchema)
|
.inputSchema(CreateCatchBookSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createFischereiApi(client);
|
const api = createFischereiApi(client);
|
||||||
@@ -333,7 +333,7 @@ export const createCatchBook = authActionClient
|
|||||||
|
|
||||||
export const updateCatchBook = authActionClient
|
export const updateCatchBook = authActionClient
|
||||||
.inputSchema(UpdateCatchBookSchema)
|
.inputSchema(UpdateCatchBookSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createFischereiApi(client);
|
const api = createFischereiApi(client);
|
||||||
@@ -356,7 +356,7 @@ export const submitCatchBook = authActionClient
|
|||||||
accountId: z.string().uuid(),
|
accountId: z.string().uuid(),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createFischereiApi(client);
|
const api = createFischereiApi(client);
|
||||||
@@ -382,7 +382,7 @@ export const reviewCatchBook = authActionClient
|
|||||||
remarks: z.string().optional(),
|
remarks: z.string().optional(),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createFischereiApi(client);
|
const api = createFischereiApi(client);
|
||||||
@@ -580,7 +580,7 @@ export const removeInspector = authActionClient
|
|||||||
|
|
||||||
export const createCompetition = authActionClient
|
export const createCompetition = authActionClient
|
||||||
.inputSchema(CreateCompetitionSchema)
|
.inputSchema(CreateCompetitionSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createFischereiApi(client);
|
const api = createFischereiApi(client);
|
||||||
@@ -601,7 +601,7 @@ export const createCompetition = authActionClient
|
|||||||
|
|
||||||
export const updateCompetition = authActionClient
|
export const updateCompetition = authActionClient
|
||||||
.inputSchema(UpdateCompetitionSchema)
|
.inputSchema(UpdateCompetitionSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createFischereiApi(client);
|
const api = createFischereiApi(client);
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import { createMemberManagementApi } from '../api';
|
|||||||
|
|
||||||
export const createMember = authActionClient
|
export const createMember = authActionClient
|
||||||
.inputSchema(CreateMemberSchema)
|
.inputSchema(CreateMemberSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createMemberManagementApi(client);
|
const api = createMemberManagementApi(client);
|
||||||
@@ -58,7 +58,7 @@ export const createMember = authActionClient
|
|||||||
|
|
||||||
export const updateMember = authActionClient
|
export const updateMember = authActionClient
|
||||||
.inputSchema(UpdateMemberSchema)
|
.inputSchema(UpdateMemberSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createMemberManagementApi(client);
|
const api = createMemberManagementApi(client);
|
||||||
@@ -77,7 +77,7 @@ export const deleteMember = authActionClient
|
|||||||
accountId: z.string().uuid(),
|
accountId: z.string().uuid(),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createMemberManagementApi(client);
|
const api = createMemberManagementApi(client);
|
||||||
@@ -95,7 +95,7 @@ export const approveApplication = authActionClient
|
|||||||
accountId: z.string().uuid(),
|
accountId: z.string().uuid(),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createMemberManagementApi(client);
|
const api = createMemberManagementApi(client);
|
||||||
@@ -112,7 +112,7 @@ export const approveApplication = authActionClient
|
|||||||
|
|
||||||
export const rejectApplication = authActionClient
|
export const rejectApplication = authActionClient
|
||||||
.inputSchema(RejectApplicationSchema)
|
.inputSchema(RejectApplicationSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createMemberManagementApi(client);
|
const api = createMemberManagementApi(client);
|
||||||
@@ -342,7 +342,7 @@ export const inviteMemberToPortal = authActionClient
|
|||||||
email: z.string().email(),
|
email: z.string().email(),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createMemberManagementApi(client);
|
const api = createMemberManagementApi(client);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export const uploadFile = authActionClient
|
|||||||
recordId: z.string().uuid().optional(),
|
recordId: z.string().uuid().optional(),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createModuleBuilderApi(client);
|
const api = createModuleBuilderApi(client);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import { validateRecordData } from '../services/record-validation.service';
|
|||||||
|
|
||||||
export const createRecord = authActionClient
|
export const createRecord = authActionClient
|
||||||
.inputSchema(CreateRecordSchema)
|
.inputSchema(CreateRecordSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createModuleBuilderApi(client);
|
const api = createModuleBuilderApi(client);
|
||||||
@@ -69,7 +69,7 @@ export const createRecord = authActionClient
|
|||||||
|
|
||||||
export const updateRecord = authActionClient
|
export const updateRecord = authActionClient
|
||||||
.inputSchema(UpdateRecordSchema.extend({ accountId: z.string().uuid() }))
|
.inputSchema(UpdateRecordSchema.extend({ accountId: z.string().uuid() }))
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createModuleBuilderApi(client);
|
const api = createModuleBuilderApi(client);
|
||||||
@@ -123,7 +123,7 @@ export const updateRecord = authActionClient
|
|||||||
|
|
||||||
export const deleteRecord = authActionClient
|
export const deleteRecord = authActionClient
|
||||||
.inputSchema(DeleteRecordSchema.extend({ accountId: z.string().uuid() }))
|
.inputSchema(DeleteRecordSchema.extend({ accountId: z.string().uuid() }))
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createModuleBuilderApi(client);
|
const api = createModuleBuilderApi(client);
|
||||||
@@ -154,7 +154,7 @@ export const deleteRecord = authActionClient
|
|||||||
|
|
||||||
export const lockRecord = authActionClient
|
export const lockRecord = authActionClient
|
||||||
.inputSchema(LockRecordSchema.extend({ accountId: z.string().uuid() }))
|
.inputSchema(LockRecordSchema.extend({ accountId: z.string().uuid() }))
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const api = createModuleBuilderApi(client);
|
const api = createModuleBuilderApi(client);
|
||||||
const userId = ctx.user.id;
|
const userId = ctx.user.id;
|
||||||
@@ -182,7 +182,7 @@ export const bulkImportRecords = authActionClient
|
|||||||
dryRun: z.boolean().default(false),
|
dryRun: z.boolean().default(false),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createModuleBuilderApi(client);
|
const api = createModuleBuilderApi(client);
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { createNewsletterApi } from '../api';
|
|||||||
|
|
||||||
export const createNewsletter = authActionClient
|
export const createNewsletter = authActionClient
|
||||||
.inputSchema(CreateNewsletterSchema)
|
.inputSchema(CreateNewsletterSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createNewsletterApi(client);
|
const api = createNewsletterApi(client);
|
||||||
@@ -28,7 +28,7 @@ export const createNewsletter = authActionClient
|
|||||||
|
|
||||||
export const updateNewsletter = authActionClient
|
export const updateNewsletter = authActionClient
|
||||||
.inputSchema(UpdateNewsletterSchema)
|
.inputSchema(UpdateNewsletterSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createNewsletterApi(client);
|
const api = createNewsletterApi(client);
|
||||||
@@ -50,7 +50,7 @@ export const createTemplate = authActionClient
|
|||||||
variables: z.array(z.string()).optional(),
|
variables: z.array(z.string()).optional(),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createNewsletterApi(client);
|
const api = createNewsletterApi(client);
|
||||||
@@ -73,7 +73,7 @@ export const addRecipients = authActionClient
|
|||||||
.optional(),
|
.optional(),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createNewsletterApi(client);
|
const api = createNewsletterApi(client);
|
||||||
@@ -94,7 +94,7 @@ export const dispatchNewsletter = authActionClient
|
|||||||
newsletterId: z.string().uuid(),
|
newsletterId: z.string().uuid(),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createNewsletterApi(client);
|
const api = createNewsletterApi(client);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import { createSiteBuilderApi } from '../api';
|
|||||||
|
|
||||||
export const createPage = authActionClient
|
export const createPage = authActionClient
|
||||||
.inputSchema(CreatePageSchema)
|
.inputSchema(CreatePageSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const api = createSiteBuilderApi(client);
|
const api = createSiteBuilderApi(client);
|
||||||
const data = await api.createPage(input, ctx.user.id);
|
const data = await api.createPage(input, ctx.user.id);
|
||||||
@@ -25,7 +25,7 @@ export const createPage = authActionClient
|
|||||||
|
|
||||||
export const saveDraft = authActionClient
|
export const saveDraft = authActionClient
|
||||||
.inputSchema(UpdatePageSchema)
|
.inputSchema(UpdatePageSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const api = createSiteBuilderApi(client);
|
const api = createSiteBuilderApi(client);
|
||||||
const data = await api.updatePage(
|
const data = await api.updatePage(
|
||||||
@@ -38,7 +38,7 @@ export const saveDraft = authActionClient
|
|||||||
|
|
||||||
export const publishPage = authActionClient
|
export const publishPage = authActionClient
|
||||||
.inputSchema(UpdatePageSchema)
|
.inputSchema(UpdatePageSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const api = createSiteBuilderApi(client);
|
const api = createSiteBuilderApi(client);
|
||||||
const data = await api.updatePage(
|
const data = await api.updatePage(
|
||||||
@@ -69,7 +69,7 @@ export const updateSiteSettings = authActionClient
|
|||||||
|
|
||||||
export const createPost = authActionClient
|
export const createPost = authActionClient
|
||||||
.inputSchema(CreatePostSchema)
|
.inputSchema(CreatePostSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const api = createSiteBuilderApi(client);
|
const api = createSiteBuilderApi(client);
|
||||||
const data = await api.createPost(input, ctx.user.id);
|
const data = await api.createPost(input, ctx.user.id);
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const REVALIDATION_PATH = '/home/[account]/meetings';
|
|||||||
|
|
||||||
export const createProtocol = authActionClient
|
export const createProtocol = authActionClient
|
||||||
.inputSchema(CreateMeetingProtocolSchema)
|
.inputSchema(CreateMeetingProtocolSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createMeetingsApi(client);
|
const api = createMeetingsApi(client);
|
||||||
@@ -44,7 +44,7 @@ export const createProtocol = authActionClient
|
|||||||
|
|
||||||
export const updateProtocol = authActionClient
|
export const updateProtocol = authActionClient
|
||||||
.inputSchema(UpdateMeetingProtocolSchema)
|
.inputSchema(UpdateMeetingProtocolSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createMeetingsApi(client);
|
const api = createMeetingsApi(client);
|
||||||
@@ -88,7 +88,7 @@ export const deleteProtocol = authActionClient
|
|||||||
|
|
||||||
export const createProtocolItem = authActionClient
|
export const createProtocolItem = authActionClient
|
||||||
.inputSchema(CreateProtocolItemSchema)
|
.inputSchema(CreateProtocolItemSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createMeetingsApi(client);
|
const api = createMeetingsApi(client);
|
||||||
@@ -109,7 +109,7 @@ export const createProtocolItem = authActionClient
|
|||||||
|
|
||||||
export const updateProtocolItem = authActionClient
|
export const updateProtocolItem = authActionClient
|
||||||
.inputSchema(UpdateProtocolItemSchema)
|
.inputSchema(UpdateProtocolItemSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createMeetingsApi(client);
|
const api = createMeetingsApi(client);
|
||||||
@@ -130,7 +130,7 @@ export const updateProtocolItem = authActionClient
|
|||||||
|
|
||||||
export const updateItemStatus = authActionClient
|
export const updateItemStatus = authActionClient
|
||||||
.inputSchema(UpdateItemStatusSchema)
|
.inputSchema(UpdateItemStatusSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createMeetingsApi(client);
|
const api = createMeetingsApi(client);
|
||||||
@@ -198,7 +198,7 @@ export const addProtocolAttachment = authActionClient
|
|||||||
mimeType: z.string().min(1),
|
mimeType: z.string().min(1),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createMeetingsApi(client);
|
const api = createMeetingsApi(client);
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ const REVALIDATE_PATH = '/home/[account]/verband';
|
|||||||
|
|
||||||
export const linkChildAccount = authActionClient
|
export const linkChildAccount = authActionClient
|
||||||
.inputSchema(SetAccountParentSchema)
|
.inputSchema(SetAccountParentSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ export const linkChildAccount = authActionClient
|
|||||||
|
|
||||||
export const unlinkChildAccount = authActionClient
|
export const unlinkChildAccount = authActionClient
|
||||||
.inputSchema(RemoveAccountParentSchema)
|
.inputSchema(RemoveAccountParentSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ export const getTransferPreview = authActionClient
|
|||||||
|
|
||||||
export const transferMember = authActionClient
|
export const transferMember = authActionClient
|
||||||
.inputSchema(TransferMemberSchema)
|
.inputSchema(TransferMemberSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createVerbandApi(client);
|
const api = createVerbandApi(client);
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ const REVALIDATE_PATH = '/home/[account]/verband';
|
|||||||
|
|
||||||
export const createClub = authActionClient
|
export const createClub = authActionClient
|
||||||
.inputSchema(CreateMemberClubSchema)
|
.inputSchema(CreateMemberClubSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createVerbandApi(client);
|
const api = createVerbandApi(client);
|
||||||
@@ -46,7 +46,7 @@ export const createClub = authActionClient
|
|||||||
|
|
||||||
export const updateClub = authActionClient
|
export const updateClub = authActionClient
|
||||||
.inputSchema(UpdateMemberClubSchema)
|
.inputSchema(UpdateMemberClubSchema)
|
||||||
.action(async ({ parsedInput: input, ctx: _ctx }) => {
|
.action(async ({ parsedInput: input, ctx }) => {
|
||||||
const client = getSupabaseServerClient();
|
const client = getSupabaseServerClient();
|
||||||
const logger = await getLogger();
|
const logger = await getLogger();
|
||||||
const api = createVerbandApi(client);
|
const api = createVerbandApi(client);
|
||||||
|
|||||||
Reference in New Issue
Block a user