Product update

This commit is contained in:
2025-10-23 13:26:09 +05:30
parent 57a235b710
commit 7cfe522512
3 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,7 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { environment } from '@environments/environment';
export interface Product {
id?: number; // Add this - the numeric primary key from backend
@ -16,7 +17,7 @@ export interface Product {
providedIn: 'root'
})
export class ProductService {
private apiUrl = 'http://127.0.0.1:5000/products'; // Replace with your actual API URL
private apiUrl = `${environment.apiUrl}/products`; // Replace with your actual API URL
constructor(private http: HttpClient) {}

View File

@ -22,10 +22,9 @@
<link rel="icon" type="image/png" href="favicon-16x16.png" />
<link rel="icon" type="image/png" href="favicon-32x32.png" />
<!-- Remove these lines if files don't exist:
<link href="fonts/inter/inter.css" rel="stylesheet" />
<link href="styles/splash-screen.css" rel="stylesheet" />
-->
<!-- Fonts and Styles -->
<link href="../public/fonts/inter/inter.css" rel="stylesheet" />
<link href="../public/styles/splash-screen.css" rel="stylesheet" />
</head>
<body class="mat-typography">

View File

@ -1,6 +1,6 @@
// src/environments/environment.ts
export const environment = {
production: false,
apiUrl: 'http://localhost:5001', // Points to existing app's backend
apiUrl: 'https://microbackend.rootxwire.com/', // Points to existing app's backend
payuUrl: 'https://test.payu.in/_payment'
};