16 lines
357 B
JavaScript
16 lines
357 B
JavaScript
|
import BaseAdapter from './base';
|
||
|
|
||
|
export default BaseAdapter.extend({
|
||
|
createRecord(store, type, snapshot) {
|
||
|
let name = snapshot.attr('name');
|
||
|
return this.ajax(this._url(type.modelName, { backend: snapshot.record.backend }, name), 'POST').then(
|
||
|
() => {
|
||
|
return {
|
||
|
id: name,
|
||
|
name,
|
||
|
};
|
||
|
}
|
||
|
);
|
||
|
},
|
||
|
});
|