Skip to content

Commit

Permalink
feat: shape tag responses
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Jul 30, 2021
1 parent 101a6e3 commit 20e5f2e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion store/booru.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,15 @@ export const actions = {
{ root: true }
)

return response
// This is how a final Booru Tag object looks like
const TAGS = response.map((TAG) => {
return {
name: TAG.name,
count: TAG.count,
}
})

return TAGS

//
} catch (error) {
Expand Down

0 comments on commit 20e5f2e

Please sign in to comment.