|
|
|
@ -31,22 +31,10 @@ class PaginateTable { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class GetJson { |
|
|
|
|
constructor(url) { |
|
|
|
|
console.assert(url !== undefined, "Invalid url is undefined"); |
|
|
|
|
console.log("GetJson url", url); |
|
|
|
|
this.item; |
|
|
|
|
this.url = url; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async item() { |
|
|
|
|
const the_url = this.url; |
|
|
|
|
const resp = await fetch(this.url); |
|
|
|
|
console.assert(resp.status == 200, "failed to get it"); |
|
|
|
|
|
|
|
|
|
this.item = await resp.json(); |
|
|
|
|
return this.item; |
|
|
|
|
} |
|
|
|
|
const GetJson = async (url) => { |
|
|
|
|
const resp = await fetch(url); |
|
|
|
|
console.assert(resp.status == 200, "failed to get it"); |
|
|
|
|
return await resp.json(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const ConfirmDelete = async (table, obj_id) => { |
|
|
|
|