Closes #12, #227 and #58
This commit is contained in:
syuilo
2017-03-18 20:05:11 +09:00
parent 2496cece91
commit 45e8331e26
150 changed files with 610 additions and 609 deletions

View File

@@ -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);