mirror of
https://github.com/discourse/discourse.git
synced 2024-12-18 18:55:59 +08:00
20 lines
429 B
JavaScript
20 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() { }
|
|
}
|
|
});
|
|
}
|
|
|