Small bug fixes
This commit is contained in:
1 parent
f9e0eb32db
commit
cedaa2e414
5 files changed
+25
-8
No files matched your search
@@ -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});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
]
|
||||
@@ -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: '**',
|
||||
|
||||
@@ -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) {}
|
||||
|
||||
|
||||
@@ -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<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(
|
||||
tap((response: any) => {
|
||||
// Store token in localStorage after successful login
|
||||
|
||||
Reference in new issue
Block a user