Solved some problems with the excel of master statistical
This commit is contained in:
@@ -4,6 +4,7 @@ import {withIronSessionApiRoute} from "iron-session/next";
|
||||
import {sessionOptions} from "@/lib/session";
|
||||
import {getLinkedUsers} from "@/utils/users.be";
|
||||
import {Type} from "@/interfaces/user";
|
||||
import {uniqBy} from "lodash";
|
||||
|
||||
export default withIronSessionApiRoute(handler, sessionOptions);
|
||||
|
||||
@@ -31,5 +32,5 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
direction,
|
||||
);
|
||||
|
||||
res.status(200).json({users, total});
|
||||
res.status(200).json({users: uniqBy([...users, req.session.user], "id"), total});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user