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