Closed ctgraham closed 3 years ago
For example: https://github.com/ulsdevteam/ccvgd-frontend/blob/2bfe6adcd44b5a8d2c86decb8d21e46ea47d3671/src/app/services/multi-village-filter.service.ts#L32-L33 and https://github.com/ulsdevteam/ccvgd-frontend/blob/2bfe6adcd44b5a8d2c86decb8d21e46ea47d3671/src/app/services/multi-village-filter.service.ts#L51-L52
Also, beware of code which hardcodes the endpoint, such as: https://github.com/ulsdevteam/ccvgd-frontend/blob/f58ccb17685a71be9d8981a19cc33a3e3db27589/src/app/table-detail/table-detail.component.ts#L62-L68
since all the API call for the backend has ccvg as prefix included, we don't need to consider if ccvg has no guarantee.
Here is the reply from yuelu (backend developer) : This 'ccvg' is actucally the hard code prefix of our backend deployment of Dr. He's server. Once we are not in that server Xiaoxin Can change this in our Library version.
The hardcoded component "ccvg" should appear in the API_ROOT
definition, not in the code.
That way it will work both with on Dr. He's server, and in an arbitrary install where the path is different.
Thanks Clinton, it is make sense
Due to the CORS policy issue happen on the server again, I unable to test it and push the new api call, Do you have any ideas to fix this?
it struggles me a lot , the server is not stable, every time I need to contact Yuelu(backend developer) to restart the server
ccvg as prefix is added to enviroment.prod.ts
There remain a number of locations where the prefix or whole URL appears to still be hardcoded:
all are updated, please see the latest commit , thanks!
Configuring a production build with the environment:
Constructs backend API calls such as:
http://test.hostname.tld:8001/api/ccvg/namesearch
But there is no guarantee that "ccvg" is a prefix in the deployment of the backend.