poter visualizzare i propri beni e servizi anche se non sei registrato alla app !
This commit is contained in:
@@ -101,6 +101,9 @@ const sendNotifSchema = new Schema({
|
||||
sendNotifSchema.statics.setNotifAsRead = function (idapp, username, idnotif) {
|
||||
const SendNotif = this;
|
||||
|
||||
if (!username)
|
||||
return null;
|
||||
|
||||
try {
|
||||
|
||||
if (idnotif) {
|
||||
|
||||
@@ -2695,6 +2695,15 @@ UserSchema.statics.getAskedFriendsByUsername = async function (idapp, username)
|
||||
|
||||
UserSchema.statics.getFriendsByUsername = async function (idapp, username) {
|
||||
|
||||
if (!username) {
|
||||
return {
|
||||
listFriends: [],
|
||||
listRequestFriends: [],
|
||||
listTrusted: [],
|
||||
listSentRequestFriends: [],
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
const whatToShow = getWhatToShow(idapp, username);
|
||||
const whatToShow_Unknown = getWhatToShow_Unknown(idapp, username);
|
||||
|
||||
Reference in New Issue
Block a user