mirror of
https://github.com/calzoneman/sync.git
synced 2024-09-13 04:32:09 +00:00
Fix regression for user profiles
This commit is contained in:
parent
35a8e2b52a
commit
014eb28e0d
@ -83,6 +83,15 @@ module.exports = {
|
||||
return callback("User does not exist");
|
||||
}
|
||||
|
||||
try {
|
||||
var profile = JSON.parse(rows[0].profile);
|
||||
profile.image = profile.image || "";
|
||||
profile.text = profile.text || "";
|
||||
rows[0].profile = profile;
|
||||
} catch (error) {
|
||||
rows[0].profile = { image: "", text: "" };
|
||||
}
|
||||
|
||||
callback(null, rows[0]);
|
||||
});
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user