From cedaa2e414e388b81ecb3e744e34b7a4e4323ffc Mon Sep 17 00:00:00 2001 From: ItzMineyy Date: Sat, 28 Dec 2024 14:34:13 +0100 Subject: [PATCH] Small bug fixes --- src/app/app.component.ts | 1 - src/app/app.routes.server.ts | 8 ++++---- src/app/app.routes.ts | 18 ++++++++++++++++++ src/app/article.service.ts | 2 +- src/app/auth.service.ts | 4 ++-- 5 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index ed605ea..20386a8 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -85,7 +85,6 @@ export class AppComponent implements OnInit { this.metaService.updateTag({ name: 'og:url', content: meta.url }); } if (meta.color) { - this.titleService.setTitle(meta.color); this.metaService.updateTag({ name: 'theme-color', content: meta.color}); } } diff --git a/src/app/app.routes.server.ts b/src/app/app.routes.server.ts index f40376e..1f8a520 100644 --- a/src/app/app.routes.server.ts +++ b/src/app/app.routes.server.ts @@ -17,10 +17,6 @@ export const serverRoutes: ServerRoute[] = [ path: 'blog', renderMode: RenderMode.Prerender, }, - { - path: '**', - renderMode: RenderMode.Client, - }, { path: 'admin', renderMode: RenderMode.Client, @@ -28,5 +24,9 @@ export const serverRoutes: ServerRoute[] = [ { path: 'login', renderMode: RenderMode.Client, + }, + { + path: '**', + renderMode: RenderMode.Client, } ] diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index c5c19c8..333f9d0 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -54,10 +54,28 @@ export const routes: Routes = [ { path: 'login', component: LoginComponent, + data: { + meta: { + title: 'Login | itzMiney', + description: 'Admin Panel Login', + image: 'https://itzminey.dev/assets/ogimg.png', + url: 'https://itzminey.dev/login', + color: '#eb284c' + } + } }, { path: 'admin', component: AdminComponent, + data: { + meta: { + title: 'Admin Panel | itzMiney', + description: 'Admin Panel', + image: 'https://itzminey.dev/assets/ogimg.png', + url: 'https://itzminey.dev/admin', + color: '#eb284c' + } + } }, { path: '**', diff --git a/src/app/article.service.ts b/src/app/article.service.ts index 4c2fec1..92b993e 100644 --- a/src/app/article.service.ts +++ b/src/app/article.service.ts @@ -7,7 +7,7 @@ import { Observable } from 'rxjs'; }) export class ArticleService { - private apiUrl = 'http://localhost:5000/api/articles'; // Replace with your API endpoint + private apiUrl = 'http://localhost:7020/api/articles'; // Replace with your API endpoint constructor(private http: HttpClient) {} diff --git a/src/app/auth.service.ts b/src/app/auth.service.ts index 2f4768e..3e3e44d 100644 --- a/src/app/auth.service.ts +++ b/src/app/auth.service.ts @@ -7,12 +7,12 @@ import {Observable, tap} from 'rxjs'; }) export class AuthService { - private apiUrl = 'http://localhost:5000/api/auth/login'; // Replace with your API endpoint + private apiUrl = 'http://localhost:7020/api/auth/login'; // Replace with your API endpoint constructor(private http: HttpClient) {} login(username: string, password: string): Observable { - return this.http.post('http://localhost:5000/api/auth/login', { username, password }) + return this.http.post('http://localhost:7020/api/auth/login', { username, password }) .pipe( tap((response: any) => { // Store token in localStorage after successful login