rename view
This commit is contained in:
18
frontend/static/js/views/AbstractAuthentifiedView.js
Normal file
18
frontend/static/js/views/AbstractAuthentifiedView.js
Normal file
@ -0,0 +1,18 @@
|
||||
import { client, navigateTo } from "../index.js";
|
||||
import AbstractRedirectView from "./AbstractRedirectView.js";
|
||||
|
||||
export default class extends AbstractRedirectView{
|
||||
constructor(params) {
|
||||
super(params, "/login");
|
||||
}
|
||||
|
||||
async redirect()
|
||||
{
|
||||
if (await client.isAuthentificate() === false)
|
||||
{
|
||||
navigateTo(this.redirect_url);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user