File tree Expand file tree Collapse file tree
app/(app)/[orgId]/tasks/[taskId] Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,21 +37,29 @@ export default async function TaskPage({
3737}
3838
3939const getTask = async ( taskId : string , session : Session ) => {
40+ console . log ( '[getTask] Starting task fetch for:' , taskId ) ;
4041 const activeOrgId = session ?. session . activeOrganizationId ;
4142
4243 if ( ! activeOrgId ) {
4344 console . warn ( 'Could not determine active organization ID in getTask' ) ;
4445 return null ;
4546 }
4647
47- const task = await db . task . findUnique ( {
48- where : {
49- id : taskId ,
50- organizationId : activeOrgId ,
51- } ,
52- } ) ;
48+ console . log ( '[getTask] Querying database for task' ) ;
49+ try {
50+ const task = await db . task . findUnique ( {
51+ where : {
52+ id : taskId ,
53+ organizationId : activeOrgId ,
54+ } ,
55+ } ) ;
5356
54- return task ;
57+ console . log ( '[getTask] Database query successful' ) ;
58+ return task ;
59+ } catch ( error ) {
60+ console . error ( '[getTask] Database query failed:' , error ) ;
61+ throw error ;
62+ }
5563} ;
5664
5765const getComments = async ( taskId : string , session : Session ) : Promise < CommentWithAuthor [ ] > => {
Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ export const auth = betterAuth({
5050 'http://localhost:3000' ,
5151 'https://app.trycomp.ai' ,
5252 'https://app.staging.trycomp.ai' ,
53+ 'https://portal.trycomp.ai' ,
54+ 'https://portal.staging.trycomp.ai' ,
5355 ] ,
5456 emailAndPassword : {
5557 enabled : true ,
Original file line number Diff line number Diff line change @@ -15,6 +15,13 @@ export const auth = betterAuth({
1515 // It's important so we can use custom IDs specified in Prisma Schema.
1616 generateId : false ,
1717 } ,
18+ trustedOrigins : [
19+ 'http://localhost:3000' ,
20+ 'https://app.trycomp.ai' ,
21+ 'https://app.staging.trycomp.ai' ,
22+ 'https://portal.trycomp.ai' ,
23+ 'https://portal.staging.trycomp.ai' ,
24+ ] ,
1825 secret : process . env . AUTH_SECRET ! ,
1926 plugins : [
2027 organization ( {
You can’t perform that action at this time.
0 commit comments