Skip to content

Commit

Permalink
Switch how guard is exported from default
Browse files Browse the repository at this point in the history
  • Loading branch information
CannonLock committed Jan 24, 2024
1 parent 41e6bbb commit 6398879
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/pages/maps/ingestion/@id/+guard.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render, redirect } from "vike/abort";

const guard = (pageContext) => {
export const guard = (pageContext) => {
const { user } = pageContext;

if (user === undefined) {
Expand All @@ -20,5 +20,3 @@ const guard = (pageContext) => {
return render(403, "Only admins are allowed to access this page.");
}
};

export default guard;

0 comments on commit 6398879

Please sign in to comment.