Skip to content

Commit

Permalink
カレンダー連携時にhomeに戻るようにした
Browse files Browse the repository at this point in the history
  • Loading branch information
yuto-trd committed Oct 27, 2024
1 parent 5271955 commit a43b231
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions task_yell/src/app/api/auth/google-cal/callback/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { google, calendar_v3 } from "googleapis";
import { type NextRequest } from "next/server";
import { firebaseAdminApp } from "@/firebase/server-app";
import { redirect } from "next/navigation";

function createOAuth2Client() {
return new google.auth.OAuth2(
Expand Down Expand Up @@ -79,4 +80,6 @@ export async function GET(req: NextRequest) {
for (const event of events) {
await ref.add(event);
}

redirect("/home");
}

0 comments on commit a43b231

Please sign in to comment.