parent
2496cece91
commit
45e8331e26
150 changed files with 610 additions and 609 deletions
|
|
@ -1,16 +1,15 @@
|
|||
'use strict';
|
||||
|
||||
/**
|
||||
* Module dependencies
|
||||
*/
|
||||
import * as mongo from 'mongodb';
|
||||
import deepcopy = require('deepcopy');
|
||||
import Post from '../models/post';
|
||||
import Like from '../models/like';
|
||||
import Vote from '../models/poll-vote';
|
||||
import serializeApp from './app';
|
||||
import serializeUser from './user';
|
||||
import serializeDriveFile from './drive-file';
|
||||
import deepcopy = require('deepcopy');
|
||||
import parse from '../common/text';
|
||||
|
||||
/**
|
||||
* Serialize a post
|
||||
|
|
@ -54,6 +53,11 @@ const self = (
|
|||
|
||||
delete _post.mentions;
|
||||
|
||||
// Parse text
|
||||
if (_post.text) {
|
||||
_post.ast = parse(_post.text);
|
||||
}
|
||||
|
||||
// Populate user
|
||||
_post.user = await serializeUser(_post.user_id, me);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue