15 lines
281 B
JavaScript
15 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
|