user.email account.plan_name - cleanup context and service construction - config for stripe callback - initial plan

This commit is contained in:
Michael Dausmann
2023-03-19 15:48:08 +11:00
parent 4959475dcc
commit 45fb639fcf
12 changed files with 81 additions and 86 deletions

View File

@@ -6,7 +6,7 @@ export const notesRouter = router({
getForCurrentUser: protectedProcedure
.input(z.object({ account_id: z.number() }))
.query(async ({ ctx, input }) => {
const notesService = new NotesService(ctx.prisma);
const notesService = new NotesService();
const notes = await notesService.getNotesForAccountId(input.account_id);
return {
notes,
@@ -15,7 +15,7 @@ export const notesRouter = router({
getById: publicProcedure
.input(z.object({ note_id: z.number() }))
.query(async ({ ctx, input }) => {
const notesService = new NotesService(ctx.prisma);
const notesService = new NotesService();
const note = await notesService.getNoteById(input.note_id);
return {
note,