mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-29 18:46:23 -05:00
19 lines
429 B
JavaScript
19 lines
429 B
JavaScript
import Store from "discourse/models/store";
|
|
import RestAdapter from 'discourse/adapters/rest';
|
|
|
|
let _restAdapter;
|
|
export default function() {
|
|
return Store.create({
|
|
container: {
|
|
lookup(type) {
|
|
if (type === "adapter:rest") {
|
|
_restAdapter = _restAdapter || RestAdapter.create({ container: this });
|
|
return (_restAdapter);
|
|
}
|
|
},
|
|
|
|
lookupFactory: function() { }
|
|
}
|
|
});
|
|
}
|
|
|