updated axios urls

This commit is contained in:
z0ccc 2021-07-27 15:59:35 -04:00
parent 6e0223ed5c
commit d9004280f6
2 changed files with 9 additions and 8 deletions

View file

@ -2,7 +2,6 @@
"name": "vytal",
"version": "0.1.0",
"private": true,
"proxy": "http://localhost:8000",
"dependencies": {
"@fortawesome/fontawesome-pro": "^5.15.3",
"@fortawesome/fontawesome-svg-core": "^1.2.35",

View file

@ -10,17 +10,19 @@ const FingerprintBlock = () => {
const [display, setDisplay] = useState('none');
useEffect(() => {
axios.get(`/fingerprint/?hash=${hash}`).then((response) => {
if (response.data.length !== 0) {
setName(response.data[response.data.length - 1].name);
}
setDisplay('block');
});
axios
.get(`http://localhost:8000/fingerprint/?hash=${hash}`)
.then((response) => {
if (response.data.length !== 0) {
setName(response.data[response.data.length - 1].name);
}
setDisplay('block');
});
}, []);
const handleSave = (e) => {
e.preventDefault();
axios.post('/fingerprint/', {
axios.post('http://localhost:8000/fingerprint/', {
name: e.target[0].value,
hash,
});