update api
This commit is contained in:
@@ -5,11 +5,12 @@ class ApiConstants {
|
||||
|
||||
// ===== Base URL Configuration =====
|
||||
/// Base URL for the API
|
||||
/// TODO: Replace with actual production URL
|
||||
static const String baseUrl = 'https://api.retailpos.example.com';
|
||||
/// Development: http://localhost:3000
|
||||
/// Production: TODO - Replace with actual production URL
|
||||
static const String baseUrl = 'http://localhost:3000';
|
||||
|
||||
/// API version prefix
|
||||
static const String apiVersion = '/api/v1';
|
||||
static const String apiVersion = '/api';
|
||||
|
||||
/// Full base URL with version
|
||||
static String get fullBaseUrl => '$baseUrl$apiVersion';
|
||||
@@ -33,8 +34,21 @@ class ApiConstants {
|
||||
|
||||
// ===== Endpoint Paths =====
|
||||
|
||||
// Authentication Endpoints
|
||||
/// POST - Login user
|
||||
static const String login = '/auth/login';
|
||||
|
||||
/// POST - Register new user
|
||||
static const String register = '/auth/register';
|
||||
|
||||
/// GET - Get current user profile (requires auth)
|
||||
static const String profile = '/auth/profile';
|
||||
|
||||
/// POST - Refresh access token (requires auth)
|
||||
static const String refreshToken = '/auth/refresh';
|
||||
|
||||
// Products Endpoints
|
||||
/// GET - Fetch all products
|
||||
/// GET - Fetch all products (with pagination and filters)
|
||||
static const String products = '/products';
|
||||
|
||||
/// GET - Fetch single product by ID
|
||||
|
||||
Reference in New Issue
Block a user