update borrow + fix invite

This commit is contained in:
_Bastler
2021-10-27 17:07:44 +02:00
parent 59ac345933
commit 925a03fd46
45 changed files with 2792 additions and 398 deletions
+14
View File
@@ -27,6 +27,11 @@ import { InvitesComponent } from './pages/invites/invites.component';
import { UrlShortenerComponent, UrlShortenerPasswordComponent } from './pages/urlshortener/urlshortener.component';
import { MinetestAccountsComponent } from './pages/minetest/accounts/accounts.component';
import { DividertestComponent } from './pages/dividertest/dividertest.component'
import { BorrowProvingComponent } from './pages/borrow/proving/proving.component';
import { BorrowItemEditComponent, BorrowItemsComponent } from './pages/borrow/items/items.component';
import { BorrowRequestsComponent } from './pages/borrow/requests/requests.component';
import { BorrowComponent } from './pages/borrow/borrow.component';
import { InviteCodeComponent } from './pages/invites/code/code.component';
const routes: Routes = [
{ path: 'profile/:username', component: UserComponent, canActivate: [ AuthUpdateGuard ] },
@@ -52,6 +57,14 @@ const routes: Routes = [
{ path: 'domains', component: DomainsComponent, canActivate: [ AuthenticatedGuard ] }
]
},
{
path: 'borrow', component: BorrowComponent, canActivate: [ AuthenticatedGuard ], children: [
{ path: '', redirectTo: "/borrow/items", pathMatch: 'full' },
{ path: 'items', component: BorrowItemsComponent, canActivate: [ AuthenticatedGuard ] },
{ path: 'requests', component: BorrowRequestsComponent, canActivate: [ AuthenticatedGuard ] },
{ path: 'proving', component: BorrowProvingComponent, canActivate: [ AuthenticatedGuard ] }
]
},
{ path: 'register', component: RegisterComponent, canActivate: [ AnonymousGuard ] },
{ path: 'tokens', component: TokensComponent, canActivate: [ AuthGuard ] },
{ path: 'jitsi', component: JitsiComponent, canActivate: [ AuthenticatedGuard ] },
@@ -62,6 +75,7 @@ const routes: Routes = [
{ path: 'urlshortener', component: UrlShortenerComponent, canActivate: [ AuthenticatedGuard ] },
{ path: 'urlshortener/:code', component: UrlShortenerPasswordComponent, canActivate: [ AuthUpdateGuard ] },
{ path: 'invites/:quota', component: InvitesComponent, canActivate: [ AuthenticatedGuard ] },
{ path: 'invite/:code', component: InviteCodeComponent, canActivate: [ AuthGuard ] },
{ path: 'unavailable', component: UnavailableComponent },
{ path: 'p/:username', component: UserComponent, canActivate: [ AuthUpdateGuard ] },
{ path: '**', component: NotfoundComponent, pathMatch: 'full', canActivate: [ AuthUpdateGuard ] }, ]