Code cleanup

This commit is contained in:
Dane Everitt 2018-04-08 16:00:52 -05:00
parent 6d970a4cc3
commit b6e94d9a1e
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
3 changed files with 14 additions and 41 deletions

View file

@ -35,8 +35,6 @@ class LoginController extends AbstractLoginController
$username = $request->input('user');
$useColumn = $this->getField($username);
sleep(1);
if ($this->hasTooManyLoginAttempts($request)) {
$this->fireLockoutEvent($request);
$this->sendLockoutResponse($request);

View file

@ -18,26 +18,15 @@ window.Ziggy = Ziggy;
Vue.use(Vuex);
const store = new Vuex.Store({
plugins: [
createFlashStore(),
],
});
const store = new Vuex.Store({ plugins: [createFlashStore()] });
const route = require('./../../../../vendor/tightenco/ziggy/src/js/route').default;
Vue.config.productionTip = false;
Vue.mixin({
methods: {
route: route,
},
});
Vue.mixin({ methods: { route } });
Vue.use(VueRouter);
Vue.use(VuexFlash, {
mixin: true,
template: require('./components/errors/Flash.template')
});
Vue.use(vuexI18n.plugin, store);
Vue.use(VuexFlash, { mixin: true, template: require('./components/errors/Flash.template') });
Vue.i18n.add('en', Locales.en);
Vue.i18n.set('en');
@ -45,38 +34,21 @@ Vue.i18n.set('en');
const router = new VueRouter({
mode: 'history',
routes: [
{
name: 'login',
path: '/auth/login',
component: Login,
},
{
name: 'forgot-password',
path: '/auth/password',
component: Login,
},
{
name: 'checkpoint',
path: '/checkpoint',
component: Login,
},
{ name: 'login', path: '/auth/login', component: Login },
{ name: 'forgot-password', path: '/auth/password', component: Login },
{ name: 'checkpoint', path: '/checkpoint', component: Login },
{
name: 'reset-password',
path: '/auth/password/reset/:token',
component: ResetPassword,
props: function (route) {
return {
token: route.params.token,
email: route.query.email || '',
}
},
}
return { token: route.params.token, email: route.query.email || '' };
}
},
{ path: '*', redirect: '/auth/login' }
]
});
require('./bootstrap');
const app = new Vue({
store,
router,
}).$mount('#pterodactyl');
const app = new Vue({ store, router }).$mount('#pterodactyl');

View file

@ -27,6 +27,9 @@ Route::group(['middleware' => 'guest'], function () {
// the forgot password routes to acquire a token (or after an account
// is created).
Route::post('/password/reset', 'ResetPasswordController')->name('auth.reset-password')->middleware('recaptcha');
// Catch any other combinations of routes and pass them off to the Vuejs component.
Route::fallback('LoginController@index');
});
/*