seepur/app/Controllers/Http/IndexController.js
Sagi Dayan d7c9359ef2 Basic logic
- DB migrations
 - Login/Register flows
 - Dockerfile
 - Layouts, Partials, Components
 - Sass
 - Bulma.io
 - sqlite
2020-01-18 15:46:06 -05:00

17 lines
374 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);
console.log(bgIndex)
return view.render('landing', {bgIndex});
}
}
}
module.exports = IndexController