update and delete

This commit is contained in:
u80864958
2025-04-28 14:25:58 +02:00
parent cc92a11060
commit f027ee7e39
10 changed files with 149 additions and 8 deletions

View File

@ -5,6 +5,7 @@ import { AdminComponent } from './routes/admin/admin.component';
import { LoggedInGuard } from './shared/guards/logged-in.guard';
import { PostEditorComponent } from './components/post-editor/post-editor.component';
import { CreatePostComponent } from './routes/post/create-post/create-post.component';
import { UpdatePostComponent } from './routes/post/update-post/update-post.component';
export const routes: Routes = [
{ path: '', component: HomeComponent },
@ -12,7 +13,11 @@ export const routes: Routes = [
path: 'post',
children: [
{ path: 'new', component: CreatePostComponent },
{ path: ':id', component: PostComponent },
{ path: ':id/edit', component: UpdatePostComponent },
{
path: ':id',
component: PostComponent,
},
],
},
{ path: 'admin', component: AdminComponent, canActivate: [LoggedInGuard] },