Registrations currently disabled due to spam. Contact me externally if you need an account

Commit e4c50752 authored by Bradley Hilton's avatar Bradley Hilton
Browse files

Add migration for renaming oauth.athorizedClients to oauth.authorizedClients

parent afcf012b
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
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
				}
			});
		});
	}
});