1acceb941d
Print all links through new uri.js component Refactor the router to use more predictable parsing Fix linking to entities with weird names (that contain slashes, + etc.)
23 lines
612 B
JavaScript
23 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;
|