Add "createchannel" endpoint

This commit is contained in:
N-Pex 2024-04-03 09:34:24 +02:00
parent 9ec91b3f2a
commit 0dc449feaa
7 changed files with 331 additions and 25 deletions

View file

@ -7,6 +7,7 @@ import Login from '../components/Login.vue'
import Profile from '../components/Profile.vue'
import CreateRoom from '../components/CreateRoom.vue'
import GetLink from '../components/GetLink.vue'
import CreateChannel from '../components/CreateChannel.vue'
import User from '../models/user'
import util from '../plugins/utils'
@ -60,6 +61,11 @@ const routes = [
name: 'GetLink',
component: GetLink,
},
{
path: '/createchannel',
name: 'CreateChannel',
component: CreateChannel,
},
{
path: '/login',
name: 'Login',
@ -97,7 +103,7 @@ const router = new VueRouter({
});
router.beforeEach((to, from, next) => {
const publicPages = ['/login', '/createroom', '/getlink'];
const publicPages = ['/login', '/createroom', '/getlink', '/createchannel'];
var authRequired = !publicPages.includes(to.path);
const loggedIn = router.app.$store.state.auth.user;