Remove duplicate - merge error
This commit is contained in:
parent
0f22707fc3
commit
90734cd098
@ -150,27 +150,6 @@ async function getApi(path,auth = false) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getApi(path,auth = false) {
|
|
||||||
let apiVer = 'v1'
|
|
||||||
let url = `https://${window.location.origin}/api/${apiVer}/${path}`
|
|
||||||
log(`getApi: Fetching from endpoint: ${url}, Auth=${auth}`)
|
|
||||||
try {
|
|
||||||
var resp = await fetch(url)
|
|
||||||
if (resp != 200) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if (!resp.ok) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if (resp.json() === "[]") {
|
|
||||||
return 'empty'
|
|
||||||
}
|
|
||||||
return resp.json();
|
|
||||||
} catch(err) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function vibe(type) {
|
async function vibe(type) {
|
||||||
let canVibrate = "vibrate" in navigator || "mozVibrate" in navigator
|
let canVibrate = "vibrate" in navigator || "mozVibrate" in navigator
|
||||||
if (canVibrate && !("vibrate" in navigator)){
|
if (canVibrate && !("vibrate" in navigator)){
|
||||||
|
Reference in New Issue
Block a user