Skip to content

Commit

Permalink
feat: simplify saved posts structure
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Jun 25, 2021
1 parent c23b43b commit d179e87
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pages/premium/saved-posts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,15 @@ export default {
const SORTED_SAVED_POSTS = this.sortPostsByDate(SAVED_POSTS)
return SORTED_SAVED_POSTS
// Transform the structure
const SIMPLE_SAVED_POSTS = SORTED_SAVED_POSTS.map((SAVED_POST) => {
return {
...SAVED_POST.data,
_saved_post_meta_data: SAVED_POST.meta_data,
}
})
return SIMPLE_SAVED_POSTS
},
},
Expand Down

0 comments on commit d179e87

Please sign in to comment.