++ su "Friends" la ricerca per username Telegram e nome e cognome
This commit is contained in:
@@ -546,7 +546,12 @@ CircuitSchema.statics.getUsersSingleCircuit = async function(idapp, username, ci
|
||||
{$unwind: '$circuit'},
|
||||
*/
|
||||
{
|
||||
$project: {username: 1, profile: 1, idapp: 1 /*, 'circuit.name': 1, 'circuit._id': 1*/},
|
||||
$project: {
|
||||
username: 1,
|
||||
name: 1,
|
||||
surname: 1,
|
||||
profile: 1, idapp: 1 /*, 'circuit.name': 1, 'circuit._id': 1*/
|
||||
},
|
||||
|
||||
},
|
||||
{
|
||||
|
||||
@@ -3133,11 +3133,22 @@ UserSchema.statics.getFieldsForSearch = function () {
|
||||
};
|
||||
|
||||
UserSchema.statics.getFieldsForSearchUserFriend = function () {
|
||||
return [{ field: 'username', type: tools.FieldType.exact }];
|
||||
return [
|
||||
{ field: 'username', type: tools.FieldType.exact },
|
||||
{ field: 'profile.username_telegram', type: tools.FieldType.string },
|
||||
{ field: 'name', type: tools.FieldType.string },
|
||||
{ field: 'surname', type: tools.FieldType.string },
|
||||
];
|
||||
};
|
||||
|
||||
UserSchema.statics.getFieldsForSearchUserFriend_AllWords = function () {
|
||||
return [{ field: 'username', type: tools.FieldType.string }];
|
||||
return [
|
||||
{ field: 'username', type: tools.FieldType.string },
|
||||
{ field: 'profile.username_telegram', type: tools.FieldType.string },
|
||||
{ field: 'name', type: tools.FieldType.string },
|
||||
{ field: 'surname', type: tools.FieldType.string },
|
||||
|
||||
];
|
||||
};
|
||||
|
||||
UserSchema.statics.executeQueryTable = function (idapp, params) {
|
||||
|
||||
@@ -614,6 +614,8 @@ router.post('/getexp', authenticate, (req, res) => {
|
||||
},
|
||||
{
|
||||
username: 1,
|
||||
name: 1,
|
||||
surname: 1,
|
||||
email: 1,
|
||||
'reported': 1,
|
||||
date_report: 1,
|
||||
|
||||
Reference in New Issue
Block a user