Small bug fixes

This commit is contained in:
ItzMineyy committed 2024-12-28 14:34:13 +01:00
1 parent f9e0eb32db
commit cedaa2e414
5 files changed
+25 -8

No files matched your search

-1
View File
@@ -85,7 +85,6 @@ export class AppComponent implements OnInit {
this.metaService.updateTag({ name: 'og:url', content: meta.url }); this.metaService.updateTag({ name: 'og:url', content: meta.url });
} }
if (meta.color) { if (meta.color) {
this.titleService.setTitle(meta.color);
this.metaService.updateTag({ name: 'theme-color', content: meta.color}); this.metaService.updateTag({ name: 'theme-color', content: meta.color});
} }
} }
+4 -4
View File
@@ -17,10 +17,6 @@ export const serverRoutes: ServerRoute[] = [
path: 'blog', path: 'blog',
renderMode: RenderMode.Prerender, renderMode: RenderMode.Prerender,
}, },
{
path: '**',
renderMode: RenderMode.Client,
},
{ {
path: 'admin', path: 'admin',
renderMode: RenderMode.Client, renderMode: RenderMode.Client,
@@ -28,5 +24,9 @@ export const serverRoutes: ServerRoute[] = [
{ {
path: 'login', path: 'login',
renderMode: RenderMode.Client, renderMode: RenderMode.Client,
},
{
path: '**',
renderMode: RenderMode.Client,
} }
] ]
+18
View File
@@ -54,10 +54,28 @@ export const routes: Routes = [
{ {
path: 'login', path: 'login',
component: LoginComponent, 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', path: 'admin',
component: AdminComponent, 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: '**', path: '**',
+1 -1
View File
@@ -7,7 +7,7 @@ import { Observable } from 'rxjs';
}) })
export class ArticleService { 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) {} constructor(private http: HttpClient) {}
+2 -2
View File
@@ -7,12 +7,12 @@ import {Observable, tap} from 'rxjs';
}) })
export class AuthService { 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) {} constructor(private http: HttpClient) {}
login(username: string, password: string): Observable<any> { login(username: string, password: string): Observable<any> {
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( .pipe(
tap((response: any) => { tap((response: any) => {
// Store token in localStorage after successful login // Store token in localStorage after successful login