Skip to content

Instantly share code, notes, and snippets.

@jamescarr
Created January 31, 2013 23:52
Show Gist options
  • Select an option

  • Save jamescarr/4687823 to your computer and use it in GitHub Desktop.

Select an option

Save jamescarr/4687823 to your computer and use it in GitHub Desktop.
var Zap = {
new_client_pre_write: function(bundle) {
var data = {
status: bundle.request.data.status,
name: bundle.request.data.name,
description: '',
contacts: [
{
name: bundle.request.data.contacts__name
}
],
};
return {
url: bundle.request.url,
method: bundle.request.method,
auth: bundle.request.auth,
headers: bundle.request.headers,
params: bundle.request.params,
data: data
}; // or return bundle.request;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment