16 lines
281 B
JavaScript
16 lines
281 B
JavaScript
|
const m = require('mithril')
|
||
|
const Authentication = require('./authentication')
|
||
|
|
||
|
const Logout = {
|
||
|
oninit: function(vnode) {
|
||
|
Authentication.clearToken()
|
||
|
m.route.set(vnode.attrs.redirect || '/')
|
||
|
},
|
||
|
|
||
|
view: function(vnode) {
|
||
|
return []
|
||
|
},
|
||
|
}
|
||
|
|
||
|
module.exports = Logout
|