gallery.accords-library.com/client/js/models/info.js

24 lines
612 B
JavaScript

'use strict';
const api = require('../api.js');
const uri = require('../util/uri.js');
const Post = require('./post.js');
class Info {
static get() {
return api.get(uri.formatApiLink('info'))
.then(response => {
return Promise.resolve(Object.assign(
{},
response,
{
featuredPost: response.featuredPost ?
Post.fromResponse(response.featuredPost) :
undefined
}));
});
}
}
module.exports = Info;