Skip to content

Commit a6e91eb

Browse files
author
Ian Redpath
committed
NOT STYLING. add edited field to comment
1 parent bbcc9a6 commit a6e91eb

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

public/project/components/libraries/library.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,12 @@ export class Library {
207207
}
208208

209209
getCommentDate(datenum: number) {
210+
const date = new Date(datenum)
211+
const year = date.getUTCFullYear()
212+
const month = date.getUTCMonth()
213+
const day = date.getUTCDay()
214+
const hour = date.getUTCHours()
215+
const minutes = date.getUTCMinutes()
210216
return new Date(datenum)
211217
}
212218

server/project/models/comment.schema.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ export default function() {
77
username: String,
88
comment: String,
99
target: String, // movie _id or library _id
10-
date: Number // numerical date object
10+
date: Number, // numerical date object
11+
edited: Boolean // has it been edited?
1112
}, { collection: 'project.comment' })
1213
return CommentSchema
1314
}

0 commit comments

Comments
 (0)