feat: add total users to people management screen (#1878)
* feat: add total users to pagination * move this.total in runInAction callback * add total counts + counts to people tabs * progress: use raw pg query * progress: add test * fix: SQL interpolation * Styling and translation of People page Co-authored-by: Tim <timothychang94@gmail.com>
This commit is contained in:
@@ -55,6 +55,17 @@ router.post("users.list", auth(), pagination(), async (ctx) => {
|
||||
};
|
||||
});
|
||||
|
||||
router.post("users.count", auth(), async (ctx) => {
|
||||
const { user } = ctx.state;
|
||||
const counts = await User.getCounts(user.teamId);
|
||||
|
||||
ctx.body = {
|
||||
data: {
|
||||
counts,
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
router.post("users.info", auth(), async (ctx) => {
|
||||
ctx.body = {
|
||||
data: presentUser(ctx.state.user),
|
||||
|
||||
Reference in New Issue
Block a user