Skip to content

Commit

Permalink
web: api register fix origin
Browse files Browse the repository at this point in the history
  • Loading branch information
rickycraft committed Jun 21, 2024
1 parent 60ef8ab commit f848b13
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions web/src/app/api/register/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { userToken } from '~/server/db/schema'
import { getServerUser } from '~/server/lib'

async function handler(req: NextRequest) {
console.log('register', req.nextUrl)
const origin = req.nextUrl.origin
const origin = process.env.NEXTAUTH_URL
// should be protected by middleware
const user = await getServerUser()
const chatId = req.nextUrl.searchParams.get('chatid')
Expand Down

0 comments on commit f848b13

Please sign in to comment.