travis-web/assets/scripts/app/adapters/ssh-key.coffee
2015-01-29 13:39:07 +01:00

16 lines
423 B
CoffeeScript

get = Ember.get
ApplicationAdapter = Travis.ApplicationAdapter
Adapter = ApplicationAdapter.extend
namespace: 'settings'
createRecord: (store, type, record) ->
data = {};
serializer = store.serializerFor(type.typeKey);
serializer.serializeIntoHash(data, type, record, { includeId: true });
this.ajax(this.buildURL(type.typeKey, null, record), "POST", { data: data })
Travis.SshKeyAdapter = Adapter