mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-09 03:26:38 +08:00
getServerSession
This commit is contained in:
parent
51e5785ce4
commit
ea0e0f8cec
@ -28,27 +28,6 @@ import { incrementAPICallCount } from '../../utils/cloud/redisRestClient';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default async function handler(req, res) {
|
||||
const session = await getServerSession(req, res, authOptions)
|
||||
|
||||
if (!session) {
|
||||
res.status(401).json({ message: "You must be logged in." });
|
||||
return;
|
||||
}
|
||||
|
||||
console.log("session within openai.ts:", session);
|
||||
|
||||
return res.json({
|
||||
message: 'Success',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export interface OpenAIListModelResponse {
|
||||
object: string;
|
||||
data: Array<{
|
||||
|
Loading…
Reference in New Issue
Block a user