This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
seepur/app/Controllers/Http/IndexController.js
2020-02-15 13:07:23 -05:00

15 lines
309 B
JavaScript

'use strict'
class IndexController {
async index({auth, view}) {
try {
await auth.check();
return view.render('home');
} catch (e) {
const bgIndex = Math.ceil((Math.random() * 10) % 5);
return view.render('landing', {bgIndex});
}
}
}
module.exports = IndexController