|
@ -7,7 +7,7 @@ async function getPluvStation_data(id) { |
|
|
if (result.data) { |
|
|
if (result.data) { |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
return null; |
|
|
|
|
|
|
|
|
return undefined; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function assemblePluvStationObject(pluvData) { |
|
|
function assemblePluvStationObject(pluvData) { |
|
@ -64,14 +64,10 @@ async function getPluviometerStation(userId, setPluviometerStation) { |
|
|
|
|
|
|
|
|
socketObject.onerror = (e) => { |
|
|
socketObject.onerror = (e) => { |
|
|
console.log(e.message); |
|
|
console.log(e.message); |
|
|
setPluviometerStation(null); |
|
|
|
|
|
|
|
|
setPluviometerStation(undefined); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
socketObject.close(); |
|
|
socketObject.close(); |
|
|
|
|
|
|
|
|
socketObject.onclose = () => { |
|
|
|
|
|
console.log("FECHOU"); |
|
|
|
|
|
}; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export default getPluviometerStation; |
|
|
export default getPluviometerStation; |