Resolve conflicts

This commit is contained in:
syuilo 2018-03-29 14:48:47 +09:00
parent 281b388e39
commit bfc193d8cd
308 changed files with 3045 additions and 3200 deletions

View file

@ -9,10 +9,11 @@ export default Channel;
export type IChannel = {
_id: mongo.ObjectID;
created_at: Date;
createdAt: Date;
title: string;
user_id: mongo.ObjectID;
userId: mongo.ObjectID;
index: number;
watchingCount: number;
};
/**
@ -47,7 +48,7 @@ export const pack = (
delete _channel._id;
// Remove needless properties
delete _channel.user_id;
delete _channel.userId;
// Me
const meId: mongo.ObjectID = me
@ -61,12 +62,12 @@ export const pack = (
if (me) {
//#region Watchしているかどうか
const watch = await Watching.findOne({
user_id: meId,
channel_id: _channel.id,
deleted_at: { $exists: false }
userId: meId,
channelId: _channel.id,
deletedAt: { $exists: false }
});
_channel.is_watching = watch !== null;
_channel.isWatching = watch !== null;
//#endregion
}