Skip to content

Commit

Permalink
Merge pull request #165 from mia-ajuda/develop
Browse files Browse the repository at this point in the history
HOTFIX - Tela de pesquisa de usuário
  • Loading branch information
sudjoao authored Sep 27, 2023
2 parents 4347341 + dadfa3c commit cd52f3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/repository/SocialNetworkRepository.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class SocialNetworkRepository extends BaseRepository {
await super.$update(socialNetworkProfile);
}

async findUsersbyName(userProfileId, userName) {
async findUsersbyName(userProfileId, userName, limit = 20) {
const query = {
_id: { $ne: ObjectID(userProfileId) },
username: { $regex: userName, $options: 'i' },
Expand All @@ -66,7 +66,7 @@ class SocialNetworkRepository extends BaseRepository {
select: ['photo', 'cnpj', 'cpf'],
};

const users = await super.$list(query, selectField, populate);
const users = await super.$list(query, selectField, populate, null, limit);

const mappedUsers = users.map((user) => mapSocialNetworkUser(user, userProfileId));

Expand Down

0 comments on commit cd52f3b

Please sign in to comment.