docs: Webservice fetchGisSystemStatic dokumentiert mit Portlogik und URL-Parameter
- .env-Variable NEXT_PUBLIC_API_PORT_MODE beschrieben - Beispielaufruf und URL-Mapping ergänzt - Pfadstruktur /docs/frontend/redux/api/... übernommen
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
// /redux/api/fromWebService/fetchGisStationsMeasurements.js
|
||||
|
||||
const apiBaseUrl = process.env.NEXT_PUBLIC_API_BASE_URL;
|
||||
|
||||
export const fetchGisStationsMeasurements = async () => {
|
||||
const apiBaseUrl = `${window.location.origin}/talas5/ClientData/WebServiceMap.asmx`;
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const idMap = params.get("m");
|
||||
const idUser = params.get("u");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// /redux/api/fromWebService/fetchGisStationsStatic.js
|
||||
|
||||
const apiBaseUrl = process.env.NEXT_PUBLIC_API_BASE_URL;
|
||||
const apiBaseUrl = `${window.location.origin}/talas5/ClientData/WebServiceMap.asmx`;
|
||||
|
||||
export const fetchGisStationsStatic = async () => {
|
||||
try {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// /redux/api/fromWebService/fetchGisStationsStaticDistrict.js
|
||||
|
||||
const apiBaseUrl = process.env.NEXT_PUBLIC_API_BASE_URL;
|
||||
|
||||
export const fetchGisStationsStaticDistrict = async () => {
|
||||
const apiBaseUrl = `${window.location.origin}/talas5/ClientData/WebServiceMap.asmx`;
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const idMap = params.get("m");
|
||||
const idUser = params.get("u");
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// /redux/api/fromWebService/fetchGisStationsStatusDistrict.js
|
||||
|
||||
const apiBaseUrl = process.env.NEXT_PUBLIC_API_BASE_URL;
|
||||
|
||||
export const fetchGisStationsStatusDistrict = async () => {
|
||||
const apiBaseUrl = `${window.location.origin}/talas5/ClientData/WebServiceMap.asmx`;
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const idMap = params.get("m");
|
||||
const idUser = params.get("u");
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
// /redux/api/fromWebService/fetchGisSystemStatic.js
|
||||
|
||||
const apiBaseUrl = process.env.NEXT_PUBLIC_API_BASE_URL;
|
||||
|
||||
export async function fetchGisSystemStatic() {
|
||||
const mode = process.env.NEXT_PUBLIC_API_PORT_MODE;
|
||||
|
||||
const apiBaseUrl = mode === "dev" ? `${window.location.protocol}//${window.location.hostname}:80/talas5/ClientData/WebServiceMap.asmx` : `${window.location.origin}/talas5/ClientData/WebServiceMap.asmx`;
|
||||
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const idMap = params.get("m");
|
||||
const idUser = params.get("u");
|
||||
//console.log("🔍 fetchGisSystemStatic - idMap:", idMap);
|
||||
//console.log("🔍 fetchGisSystemStatic - idUser:", idUser);
|
||||
//console.log("🔍 fetchGisSystemStatic - URL:", `${apiBaseUrl}/GisSystemStatic?idMap=${idMap}&idUser=${idUser}`);
|
||||
console.log("🔍 fetchGisSystemStatic - idMap:", idMap);
|
||||
console.log("🔍 fetchGisSystemStatic - idUser:", idUser);
|
||||
console.log("🔍 fetchGisSystemStatic - URL:", `${apiBaseUrl}/GisSystemStatic?idMap=${idMap}&idUser=${idUser}`);
|
||||
|
||||
const response = await fetch(`${apiBaseUrl}/GisSystemStatic?idMap=${idMap}&idUser=${idUser}`);
|
||||
const data = await response.json();
|
||||
|
||||
Reference in New Issue
Block a user