Commit e4c50752 authored by Bradley Hilton's avatar Bradley Hilton

Add migration for renaming oauth.athorizedClients to oauth.authorizedClients

parent afcf012b
RocketChat.Migrations.add({
version: 73,
up: function() {
RocketChat.models.Users.find({ 'oauth.athorizedClients': { $exists: true } }, { oauth: 1 }).forEach(function(user) {
RocketChat.models.Users.update({ _id: user._id }, {
$set: {
'oauth.authorizedClients': user.oauth.athorizedClients
},
$unset: {
'oauth.athorizedClients': 1
}
});
});
}
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment