Skip to content

Commit

Permalink
Revert application.js change
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdaley committed Apr 6, 2023
1 parent d78acef commit 829f52d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions web/app/routes/application.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import Route from "@ember/routing/route";
import { UnauthorizedError } from "@ember-data/adapter/error";
import { action } from "@ember/object";
import config from "hermes/config/environment";
import { inject as service } from "@ember/service";

Expand All @@ -8,6 +10,14 @@ export default class ApplicationRoute extends Route {
@service flags;
@service session;

@action
error(error) {
if (error instanceof UnauthorizedError) {
this.session.invalidate();
return;
}
}

async beforeModel() {
await this.session.setup();

Expand Down

0 comments on commit 829f52d

Please sign in to comment.