dockered
This commit is contained in:
15
django/frontend/static/js/views/accounts/LogoutView.js
Normal file
15
django/frontend/static/js/views/accounts/LogoutView.js
Normal file
@ -0,0 +1,15 @@
|
||||
import { client, navigateTo } from "../../index.js";
|
||||
import AbstractAuthenticatedView from "../abstracts/AbstractAuthenticatedView.js";
|
||||
|
||||
export default class extends AbstractAuthenticatedView
|
||||
{
|
||||
constructor(params, lastPageUrl = '/login') {
|
||||
super(params, 'logoutWindowTitle', lastPageUrl);
|
||||
this.lastPageUrl = lastPageUrl;
|
||||
}
|
||||
|
||||
async postInit() {
|
||||
await client.logout();
|
||||
navigateTo(this.lastPageUrl);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user