Promises lul
This commit is contained in:
parent
6624995377
commit
f900ad6467
@ -36,10 +36,15 @@ export default bot => {
|
|||||||
fetch(apis.pr0gag.item + id.toString()),
|
fetch(apis.pr0gag.item + id.toString()),
|
||||||
id
|
id
|
||||||
])
|
])
|
||||||
.then(([list, item, id]) => [
|
.then(([list, item, id]) => Promise.all([
|
||||||
list.json().items.filter(item => item.id === id)[0],
|
list.json(),
|
||||||
item.json(),
|
item.json(),
|
||||||
id
|
id
|
||||||
|
]))
|
||||||
|
.then(([list, item, id]) => [
|
||||||
|
list.items.filter(item => item.id === id)[0],
|
||||||
|
item,
|
||||||
|
id
|
||||||
])
|
])
|
||||||
.then(([list, item, id]) => ({
|
.then(([list, item, id]) => ({
|
||||||
created: list.created,
|
created: list.created,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user