mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-06-19 18:21:13 +02:00
Delete cover position data when cover photo is deleted
This commit is contained in:
@@ -116,7 +116,7 @@ module.exports = function (Groups) {
|
||||
}
|
||||
|
||||
Groups.removeCover = function (data, callback) {
|
||||
db.deleteObjectFields('group:' + data.groupName, ['cover:url', 'cover:thumb:url'], callback);
|
||||
db.deleteObjectFields('group:' + data.groupName, ['cover:url', 'cover:thumb:url', 'cover:position'], callback);
|
||||
};
|
||||
|
||||
};
|
||||
@@ -222,6 +222,6 @@ module.exports = function (User) {
|
||||
};
|
||||
|
||||
User.removeCoverPicture = function (data, callback) {
|
||||
db.deleteObjectField('user:' + data.uid, 'cover:url', callback);
|
||||
db.deleteObjectFields('user:' + data.uid, ['cover:url', 'cover:position'], callback);
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user