Skip to content

Commit

Permalink
Fixed: Instead of ouching middleware should call abortNavigation() to…
Browse files Browse the repository at this point in the history
… prevent navigation.
  • Loading branch information
rizen committed Oct 30, 2024
1 parent 13c4dfb commit c9a69b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions app/middleware/admin.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { ouch } from '#ving/utils/ouch.mjs';
export default defineNuxtRouteMiddleware(async (to, from) => {
const currentUser = useCurrentUser();
if (!currentUser.props?.admin) {
throw ouch(403, 'You must be an admin to view this.');
return abortNavigation('You must be an admin to view this.');
}
});
3 changes: 3 additions & 0 deletions ving/docs/change-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ outline: deep

## October 2024

### 2024-10-30
* Fixed: Instead of ouching middleware should call abortNavigation() to prevent navigation.

### 2024-10-28
* Switched jobs to use redis from a remote cluster.
* Switched S3File bucket url from app.domain.com.s3.amazonaws.com to s3.amazonaws.com/app.domain.com. And the same for the thumbnail bucket.
Expand Down

0 comments on commit c9a69b4

Please sign in to comment.