36 lines
414 B
JavaScript
36 lines
414 B
JavaScript
|
module.exports = {
|
||
|
|
||
|
|
||
|
friendlyName: 'View login',
|
||
|
|
||
|
|
||
|
description: 'Display "Login" page.',
|
||
|
|
||
|
|
||
|
exits: {
|
||
|
|
||
|
success: {
|
||
|
viewTemplatePath: 'pages/entrance/login',
|
||
|
},
|
||
|
|
||
|
redirect: {
|
||
|
description: 'The requesting user is already logged in.',
|
||
|
responseType: 'redirect'
|
||
|
}
|
||
|
|
||
|
},
|
||
|
|
||
|
|
||
|
fn: async function () {
|
||
|
|
||
|
if (this.req.me) {
|
||
|
throw {redirect: '/'};
|
||
|
}
|
||
|
|
||
|
return {};
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
};
|