Skip to content

Commit

Permalink
Shut up typescript #1
Browse files Browse the repository at this point in the history
  • Loading branch information
debdutdeb committed Nov 29, 2022
1 parent 9a96214 commit 6680b54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/meteor/app/api/server/lib/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export async function findUsersToAutocomplete({
const searchFields = settings.get<string>('Accounts_SearchFields').trim().split(',');
const exceptions = selector.exceptions || [];
const conditions = selector.conditions || {};
const options: FindOptions<IUser> = {
const options = {
projection: {
name: 1,
username: 1,
Expand Down Expand Up @@ -53,7 +53,7 @@ export async function findUsersToAutocomplete({
new RegExp(escapeRegExp(selector.term), 'i'),
exceptions,
conditions,
options,
options as FindOptions<IUser>,
).toArray();

return {
Expand Down
4 changes: 2 additions & 2 deletions apps/meteor/app/livechat/server/api/lib/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export async function findAgents({
}: {
text: string | undefined;
pagination: PaginationWithSort;
}): Promise<ReturnType<typeof findUsers>> {
}): Promise<{ users: ILivechatAgent[]; count: number; offset: number; total: number }> {
return findUsers<ILivechatAgent>({
role: 'livechat-agent',
text,
Expand All @@ -75,7 +75,7 @@ export async function findManagers({
}: {
text: string | undefined;
pagination: IPaginationOptions & { sort: { [k: string]: SortDirection } };
}): Promise<ReturnType<typeof findUsers>> {
}): Promise<{ users: ILivechatAgent[]; count: number; offset: number; total: number }> {
return findUsers<ILivechatAgent>({
role: 'livechat-manager',
text,
Expand Down

0 comments on commit 6680b54

Please sign in to comment.