mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-21 13:24:27 +00:00
fixed login and register frontend
This commit is contained in:
+1
-1
@@ -8,5 +8,5 @@ RUN composer install
|
||||
|
||||
COPY wait.sh /usr/local/bin/wait.sh
|
||||
RUN chmod +x /usr/local/bin/wait.sh
|
||||
CMD /usr/local/bin/wait.sh && php artisan migrate && php artisan db:seed && php artisan serve --host=0.0.0.0 --port=8000
|
||||
CMD /usr/local/bin/wait.sh && composer dumpautoload && php artisan migrate && php artisan db:seed && php artisan serve --host=0.0.0.0 --port=8000
|
||||
EXPOSE 8000
|
||||
|
||||
@@ -3,7 +3,11 @@ import store from '~/store'
|
||||
export default async (to, from, next) => {
|
||||
if (!store.getters['auth/check']) {
|
||||
next({ name: 'login' })
|
||||
} else {
|
||||
}
|
||||
else if (store.getters['auth/user'].role == "admin"){
|
||||
next({ name : 'admin.home' })
|
||||
}
|
||||
else {
|
||||
next()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
<script>
|
||||
import Form from 'vform'
|
||||
import LoginWithGithub from '~/components/LoginWithGithub'
|
||||
import store from '~/store'
|
||||
|
||||
export default {
|
||||
middleware: 'guest',
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
<script>
|
||||
import Form from 'vform'
|
||||
import LoginWithGithub from '~/components/LoginWithGithub'
|
||||
import store from '~/store'
|
||||
|
||||
export default {
|
||||
middleware: 'guest',
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
middleware: ['auth', 'admin'],
|
||||
middleware: ['auth'],
|
||||
|
||||
metaInfo () {
|
||||
return { title: this.$t('home') }
|
||||
|
||||
Reference in New Issue
Block a user