Skip to content

Commit

Permalink
properly redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
dtinth committed Apr 10, 2024
1 parent 5b1e319 commit 6d43579
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/dashboard/sign/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import { ObjectId } from 'mongodb'
import { Icon } from 'react-iconify-icon-wrapper'
const { user } = Astro.locals
if (!user) return Astro.redirect('/')
if (!user) {
return Astro.redirect('/auth/login?dest=' + encodeURIComponent(Astro.url.pathname + Astro.url.search))
}
const generateSignature = (msg: string) => {
const key = process.env.SIGN_KEY_01
Expand Down

0 comments on commit 6d43579

Please sign in to comment.