Skip to content

Instantly share code, notes, and snippets.

@tmtk75
Created July 4, 2014 09:54
Show Gist options
  • Save tmtk75/ab92d1c547bb25f67a5c to your computer and use it in GitHub Desktop.
Save tmtk75/ab92d1c547bb25f67a5c to your computer and use it in GitHub Desktop.
function test_05_turnUser_disable(params, context, done) {
$.ajax({
type: 'PUT',
url: params['baseURL'] + '/apps/' + context.getAppID()
+ '/users/' + params['userID'] + '/status',
headers: {
'x-kii-appid': context.getAppID(),
'x-kii-appkey':context.getAppKey(),
'authorization': 'bearer ' + params['token']
},
contentType: 'application/json',
data: JSON.stringify({
'disabled': true
})
}).then(
function(data, status, xhr) {
done();
},
function(xhr, status, error) {
done(xhr.status + " " + status + " " + error);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment