Skip to content

Commit

Permalink
fix: rename from playground to pg (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
WooWan authored Aug 4, 2024
1 parent ffe74a4 commit c03ed4f
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/app/(auth)/sign-in/google/callback/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export async function GET(request: Request): Promise<Response> {
return new Response(null, {
status: 302,
headers: {
Location: "/playground/sign-in",
Location: "/pg/sign-in",
},
});
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/(auth)/sign-in/kakao/callback/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export async function GET(request: Request): Promise<Response> {
return new Response(null, {
status: 302,
headers: {
Location: "/playground/sign-in",
Location: "/pg/sign-in",
},
});
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/(auth)/sign-in/naver/callback/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export async function GET(request: Request): Promise<Response> {
return new Response(null, {
status: 302,
headers: {
Location: "/playground/sign-in",
Location: "/pg/sign-in",
},
});
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/(auth)/sign-out/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
invalidateSessionCookie,
} from "~/lib/auth/utils";

export async function signOutAction(redirectUrl = "/playground/sign-in") {
export async function signOutAction(redirectUrl = "/pg/sign-in") {
const { session } = await getAuth();
if (!session) {
invalidateSessionCookie();
Expand Down
2 changes: 1 addition & 1 deletion src/app/(auth)/sign-out/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export async function GET(): Promise<Response> {
return new Response(null, {
status: 302,
headers: {
Location: "/playground/sign-in",
Location: "/pg/sign-in",
},
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default async function Page({
return (
<HydrationBoundary state={dehydrate(queryClient)}>
<AMain>
<ALink href="/playground/invitation-response">뒤로가기</ALink>
<ALink href="/pg/invitation-response">뒤로가기</ALink>
<InvitationResponseInfo />
</AMain>
</HydrationBoundary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default function InvitationResponseList() {
<div className="grid grid-cols-3 gap-2">
{responses.map((response) => (
<Link
href={`/playground/invitation-response/${response.id}`}
href={`/pg/invitation-response/${response.id}`}
key={response.id}
>
<Card>
Expand Down
2 changes: 1 addition & 1 deletion src/app/(playground)/pg/test/[testId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default async function Page({ params }: { params: { testId: string } }) {
return (
<HydrationBoundary state={dehydrate(queryClient)}>
<AMain>
<ALink href="/playground/test">뒤로가기</ALink>
<ALink href="/pg/test">뒤로가기</ALink>
<TestInfo />
<TestEditDialog />
</AMain>
Expand Down
2 changes: 1 addition & 1 deletion src/app/(playground)/pg/test/test-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default function TestList() {
{data?.length === 0 && <div>데이터를 찾을 수 없습니다.</div>}
{data?.map((test) => (
<div key={test.id} className="relative">
<Link href={`/playground/test/${test.id}`}>
<Link href={`/pg/test/${test.id}`}>
<Card className="transition hover:bg-accent">
<CardHeader>
<CardTitle>{test.name}</CardTitle>
Expand Down
8 changes: 4 additions & 4 deletions src/lib/db/schema/test.query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {

export async function createTest(data: TestInsert) {
const res = await db.insert(tests).values(data);
revalidatePath("/playground/test");
revalidatePath("/pg/test");
return res;
}

Expand Down Expand Up @@ -78,13 +78,13 @@ export async function getTestWithTestJobs(id: Test["id"]) {

export async function updateTest(data: Test) {
await db.update(tests).set(data).where(eq(tests.id, data.id));
revalidatePath("/playground/test");
revalidatePath(`/playground/test/${data.id}`);
revalidatePath("/pg/test");
revalidatePath(`/pg/test/${data.id}`);
}

export async function deleteTest(id: Test["id"]) {
await db.delete(tests).where(eq(tests.id, id));
revalidatePath("/playground/test");
revalidatePath("/pg/test");
}

/* ------ test job ------ */
Expand Down

0 comments on commit c03ed4f

Please sign in to comment.