Skip to content

Commit

Permalink
fix/revalidate path if repo added
Browse files Browse the repository at this point in the history
  • Loading branch information
psiddharthdesign committed Jul 22, 2024
1 parent d673602 commit 9d3fd64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export async function GET(request: Request) {
// HACK_ALERT!!!
// cookie is probably set on 'next.digger.dev' we have to change it to `.digger.dev`
const cookieKey = `sb-${process.env.SUPABASE_PROJECT_REF}-auth-token`;
const cookieValue = cookies().get(cookieKey)?.value;
const cookieStore = cookies();
const currentCookieValue = cookieStore.get(cookieKey)?.value;
// get domain of current reques
Expand Down
3 changes: 3 additions & 0 deletions src/data/user/repos.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use server';

import { createSupabaseUserServerComponentClient } from '@/supabase-clients/user/createSupabaseUserServerComponentClient';
import { revalidatePath } from 'next/cache';

export async function getRepoDetails(repoId: number) {
const supabaseClient = createSupabaseUserServerComponentClient();
Expand Down Expand Up @@ -28,5 +29,7 @@ export async function getOrganizationRepos(organizationId: string) {
throw error;
}

revalidatePath(`/org/${organizationId}/projects/create`, 'page');

return data;
}

0 comments on commit 9d3fd64

Please sign in to comment.