diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-03-29 14:48:47 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-03-29 14:48:47 +0900 |
| commit | bfc193d8cd9aecdb82d585e8b4e101deac60a5bb (patch) | |
| tree | 8b4dac3a56cf703650c8207f9279028a8560a96b /src/server/api/models/post-reaction.ts | |
| parent | resolve conflict (diff) | |
| download | sharkey-bfc193d8cd9aecdb82d585e8b4e101deac60a5bb.tar.gz sharkey-bfc193d8cd9aecdb82d585e8b4e101deac60a5bb.tar.bz2 sharkey-bfc193d8cd9aecdb82d585e8b4e101deac60a5bb.zip | |
Resolve conflicts
Diffstat (limited to 'src/server/api/models/post-reaction.ts')
| -rw-r--r-- | src/server/api/models/post-reaction.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/server/api/models/post-reaction.ts b/src/server/api/models/post-reaction.ts index 5cd122d76b..f9a3f91c21 100644 --- a/src/server/api/models/post-reaction.ts +++ b/src/server/api/models/post-reaction.ts @@ -4,13 +4,15 @@ import db from '../../../db/mongodb'; import Reaction from './post-reaction'; import { pack as packUser } from './user'; -const PostReaction = db.get<IPostReaction>('post_reactions'); +const PostReaction = db.get<IPostReaction>('postReactions'); export default PostReaction; export interface IPostReaction { _id: mongo.ObjectID; - created_at: Date; - deleted_at: Date; + createdAt: Date; + deletedAt: Date; + postId: mongo.ObjectID; + userId: mongo.ObjectID; reaction: string; } @@ -45,7 +47,7 @@ export const pack = ( delete _reaction._id; // Populate user - _reaction.user = await packUser(_reaction.user_id, me); + _reaction.user = await packUser(_reaction.userId, me); resolve(_reaction); }); |