assign id
This commit is contained in:
parent
2e516eeeef
commit
fcfd649042
1 changed files with 8 additions and 0 deletions
|
|
@ -64,6 +64,14 @@ const getWallPage = async page => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
for (const [key, post] of Object.entries(clean.posts)) {
|
||||||
|
if (post === null) {
|
||||||
|
delete clean.posts[key]
|
||||||
|
} else {
|
||||||
|
post.id = key
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!Common.Schema.isWallPage(clean)) {
|
if (!Common.Schema.isWallPage(clean)) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Fetched page not a wall page, instead got: ${JSON.stringify(clean)}`
|
`Fetched page not a wall page, instead got: ${JSON.stringify(clean)}`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue