From 5258bc4268514224661d96600fffc1da2bc06870 Mon Sep 17 00:00:00 2001 From: thom Date: Wed, 16 Oct 2024 16:42:06 -0700 Subject: [PATCH] feat: all roles land on correct page + paras can see their tasks --- src/backend/routers/para.ts | 4 ++-- src/pages/signInPage.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/routers/para.ts b/src/backend/routers/para.ts index 7e34217f..7c070eb0 100644 --- a/src/backend/routers/para.ts +++ b/src/backend/routers/para.ts @@ -1,5 +1,5 @@ import { z } from "zod"; -import { hasCaseManager, router } from "../trpc"; +import { hasCaseManager, hasPara, router } from "../trpc"; import { createPara } from "../lib/db_helpers/case_manager"; export const para = router({ @@ -61,7 +61,7 @@ export const para = router({ // TODO elsewhere: add "email_verified_at" timestamp when para first signs in with their email address (entered into db by cm) }), - getMyTasks: hasCaseManager.query(async (req) => { + getMyTasks: hasPara.query(async (req) => { const { userId } = req.ctx.auth; const result = await req.ctx.db diff --git a/src/pages/signInPage.tsx b/src/pages/signInPage.tsx index aca09591..d7b68d3b 100644 --- a/src/pages/signInPage.tsx +++ b/src/pages/signInPage.tsx @@ -32,7 +32,7 @@ const SignInPage = () => { className={$button.default} onClick={() => signIn("google", { - callbackUrl: "/students", + callbackUrl: "/", }) } >