some changes
This commit is contained in:
parent
9be1dab6f3
commit
814ec1e952
|
|
@ -10,7 +10,7 @@
|
||||||
<input type="submit" value="Отправить"></p>
|
<input type="submit" value="Отправить"></p>
|
||||||
</form>
|
</form>
|
||||||
<div id="result"></div>
|
<div id="result"></div>
|
||||||
<img id="image" />
|
<img id="image" style="max-width: 200px;"/>
|
||||||
</body>
|
</body>
|
||||||
<script src="static/scripts.js"></script>
|
<script src="static/scripts.js"></script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,17 @@ async function SavePhoto()
|
||||||
let response = await fetch('/beeds', {method: "POST", body: formData});
|
let response = await fetch('/beeds', {method: "POST", body: formData});
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
let json = await response.json();
|
let json = await response.json();
|
||||||
var text = ""
|
let text = ""
|
||||||
|
let uniqChecker = {}
|
||||||
for (let key in json.results_net) {
|
for (let key in json.results_net) {
|
||||||
text += "<div>" + json.results_net[key] + ": " + key + "</div>"
|
text += "<div>" + json.results_net[key] + ": " + key + "</div>";
|
||||||
|
uniqChecker[json.results_net[key]] = key;
|
||||||
}
|
}
|
||||||
for (let key in json.results) {
|
for (let key in json.results) {
|
||||||
text += "<div>" + json.results[key] + ": " + key + "</div>"
|
if (uniqChecker[json.results[key]] != undefined) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
text += "<div>" + json.results[key] + ": " + key + "</div>";
|
||||||
}
|
}
|
||||||
document.getElementById("result").innerHTML = text;
|
document.getElementById("result").innerHTML = text;
|
||||||
let urlCreator = window.URL || window.webkitURL;
|
let urlCreator = window.URL || window.webkitURL;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue