This repository was archived by the owner on Apr 18, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export async function isLoggedIn(hashedKey?: string) {
3232 // Client-side
3333 const response = await fetch ( "/api/chatgpt/verify" , {
3434 method : "POST" ,
35- body : hashedKey ?? "" ,
35+ body : hashedKey ?? "NOPE " ,
3636 } ) . then ( ( it ) => it . json ( ) ) ;
3737
3838 return response . loggedIn ;
@@ -47,7 +47,7 @@ export async function isLoggedIn(hashedKey?: string) {
4747 const headersPropagated = { cookie : headers ( ) . get ( "cookie" ) as string } ;
4848 const response = await fetch ( new URL ( "/api/chatgpt/verify" , new URL ( urlStr ) ) , {
4949 method : "POST" ,
50- body : hashedKey ?? "" ,
50+ body : hashedKey ?? "NOPE " ,
5151 headers : headersPropagated ,
5252 } ) . then ( ( it ) => it . json ( ) ) ;
5353 console . log ( "response" , response ) ;
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ const handler: NextApiHandler = async (req, res) => {
88 res . status ( 404 ) . json ( { error : "Not found" } ) ;
99 return ;
1010 }
11- const keyHashed = req . body ? req . body : req . cookies [ SITE_USER_COOKIE ] ?? "" ;
11+ const keyHashed = req . body . length > 10 ? req . body : req . cookies [ SITE_USER_COOKIE ] ?? "" ;
1212
1313 if ( ! keyHashed ) {
1414 res . status ( 200 ) . json ( { message : "You're not logged in yet!" , loggedIn : false } ) ;
You can’t perform that action at this time.
0 commit comments