mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-25 00:29:30 -05:00
20 lines
429 B
Text
20 lines
429 B
Text
|
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() { }
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|