1
0
mirror of https://github.com/flarum/core.git synced 2025-08-06 16:36:47 +02:00

Hello world!

This commit is contained in:
Toby Zerner
2014-12-20 16:56:46 +10:30
commit 74db323f83
279 changed files with 11954 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
import Ember from 'ember';
import DS from 'ember-data';
export default DS.JsonApiAdapter.extend({
host: '/api',
xhr: [],
ajax: function(url, type, hash) {
var adapter = this;
return new Ember.RSVP.Promise(function(resolve, reject) {
hash = adapter.ajaxOptions(url, type, hash);
hash.success = function(json) {
Ember.run(null, resolve, json);
};
hash.error = function(jqXHR, textStatus, errorThrown) {
Ember.run(null, reject, adapter.ajaxError(jqXHR));
};
adapter.xhr.push(Ember.$.ajax(hash));
}, "DS: RestAdapter#ajax " + type + " to " + url);
},
});