feat(app, plugins): expose q for custom templates and users handle in 3rd party plugins (#633)

This commit is contained in:
Simon Lecoq
2021-10-28 23:25:13 -04:00
committed by GitHub
parent 2c8e32b859
commit c3d96cff4c
5 changed files with 5 additions and 5 deletions

View File

@@ -24,7 +24,7 @@ export default async function({login, q, imports, data, account}, {enabled = fal
const {data:{items:[{reputation, badge_counts:{bronze, silver, gold}, answer_count:answers, question_count:questions, view_count:views}]}} = await imports.axios.get(`${api.user}?site=stackoverflow&filter=${filters.user}`)
const {data:{total:comments}} = await imports.axios.get(`${api.user}/comments?site=stackoverflow&filter=total`)
//Save result
result.user = {reputation, badges:bronze + silver + gold, questions, answers, comments, views}
result.user = {id:user, reputation, badges:bronze + silver + gold, questions, answers, comments, views}
}
//Answers