useUsers refactor
This commit is contained in:
@@ -25,17 +25,20 @@ export async function getSpecificUsers(ids: string[]) {
|
||||
.toArray();
|
||||
}
|
||||
|
||||
type Query = { [key: string]: string | string[] | undefined };
|
||||
|
||||
|
||||
export async function getLinkedUsers(
|
||||
userID?: string,
|
||||
userType?: Type,
|
||||
type?: Type,
|
||||
query?: Query,
|
||||
page?: number,
|
||||
size?: number,
|
||||
sort?: string,
|
||||
direction?: "asc" | "desc",
|
||||
) {
|
||||
const filters = {
|
||||
...(!!type ? {type} : {}),
|
||||
...(!!query ? query : {}),
|
||||
};
|
||||
|
||||
if (!userID || userType === "admin" || userType === "developer") {
|
||||
|
||||
Reference in New Issue
Block a user