♻️ refactor: Refactor API endpoints to use dynamic API prefix from environment variables
- Updated all service files to replace hardcoded API paths with `${import.meta.env.VITE_API_PREFIX}` for better configurability.
- Ensured consistency across user, common, and gateway services by applying the new API prefix format.
- Removed unnecessary comments and maintained ESLint disable directives where applicable.
This commit is contained in:
+15
-3
@@ -135,7 +135,7 @@
|
||||
[
|
||||
"@semantic-release/exec",
|
||||
{
|
||||
"prepareCmd": "bun run build && tar -czf admin.tar.gz -C apps/admin/dist . && tar -czf user.tar.gz -C apps/user/dist ."
|
||||
"prepareCmd": "bun run build && tar -czf admin.tar.gz -C apps/admin/dist . && tar -czf user.tar.gz -C apps/user/dist . && echo 'VITE_API_PREFIX=/api' > apps/admin/.env && echo 'VITE_API_PREFIX=/api' > apps/user/.env && bun run build && tar -czf admin-with-api.tar.gz -C apps/admin/dist . && tar -czf user-with-api.tar.gz -C apps/user/dist ."
|
||||
}
|
||||
],
|
||||
[
|
||||
@@ -144,11 +144,23 @@
|
||||
"assets": [
|
||||
{
|
||||
"path": "admin.tar.gz",
|
||||
"name": "ppanel-admin-web.tar.gz"
|
||||
"name": "ppanel-admin-web.tar.gz",
|
||||
"label": "Admin Web (without API prefix)"
|
||||
},
|
||||
{
|
||||
"path": "user.tar.gz",
|
||||
"name": "ppanel-user-web.tar.gz"
|
||||
"name": "ppanel-user-web.tar.gz",
|
||||
"label": "User Web (without API prefix)"
|
||||
},
|
||||
{
|
||||
"path": "admin-with-api.tar.gz",
|
||||
"name": "ppanel-admin-web-with-api.tar.gz",
|
||||
"label": "Admin Web (with /api prefix)"
|
||||
},
|
||||
{
|
||||
"path": "user-with-api.tar.gz",
|
||||
"name": "ppanel-user-web-with-api.tar.gz",
|
||||
"label": "User Web (with /api prefix)"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user