Resolve conflicts
This commit is contained in:
parent
281b388e39
commit
bfc193d8cd
308 changed files with 3045 additions and 3200 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue