mirror of
https://github.com/wassname/talk.git
synced 2026-07-01 23:34:14 +08:00
21 lines
465 B
JavaScript
21 lines
465 B
JavaScript
const Asset = {
|
|
comments({id}, _, {loaders}) {
|
|
return loaders.Comments.getByAssetID.load(id);
|
|
},
|
|
settings({settings = null}, _, {loaders}) {
|
|
return loaders.Settings.load()
|
|
.then((globalSettings) => {
|
|
|
|
if (settings) {
|
|
settings = Object.assign({}, settings, globalSettings.toObject());
|
|
} else {
|
|
settings = globalSettings.toObject();
|
|
}
|
|
|
|
return settings;
|
|
});
|
|
}
|
|
};
|
|
|
|
module.exports = Asset;
|