Skip to content

Commit

Permalink
Update generate.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
babaohuang committed Dec 14, 2023
1 parent f4a94d0 commit ab31662
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/pages/api/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const post: APIRoute = async(context) => {
},
}), { status: 401 })
}
console.log('Verifying signature with:', { time, message: messages?.[messages.length - 1]?.content || '' });
if (import.meta.env.PROD && !await verifySignature({ t: time, m: messages?.[messages.length - 1]?.content || '' }, sign)) {
return new Response(JSON.stringify({
error: {
Expand Down

0 comments on commit ab31662

Please sign in to comment.