Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rohit/s3 en 2232 get prompts api #88

Merged
merged 8 commits into from
May 9, 2024

Conversation

rohit-kadhe
Copy link
Collaborator

No description provided.

@rohit-kadhe rohit-kadhe force-pushed the rohit/S3EN-2232-get-prompts-api branch from 8b0bde1 to fd347a2 Compare May 8, 2024 18:56
} catch (error) {
console.error(error);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you remove this

import { getServerSession } from "next-auth";
import { redirect } from "next/navigation";
import { NextRequest, NextResponse } from "next/server";

export async function GET(req: NextRequest) {
try {
const session = await getServerSession(authOptions);
if (!session || !session.user) {
redirect("/login");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you revert this back to redirect("/login"). we need to find a better way to do this but for now this is the approach we are taking for apis used by the client

@rohit-kadhe rohit-kadhe merged commit 974756f into development May 9, 2024
@rohit-kadhe rohit-kadhe deleted the rohit/S3EN-2232-get-prompts-api branch May 9, 2024 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants