|
|
@@ -6,6 +6,7 @@ export class ContentItem {
|
|
|
public readonly data: ContentParams;
|
|
|
public readonly hash: string;
|
|
|
public readonly type: string;
|
|
|
+ public readonly date: Date;
|
|
|
|
|
|
public readonly myTagsWithoutAll: string[];
|
|
|
public readonly allLinks: ContentLink[];
|
|
|
@@ -30,6 +31,12 @@ export class ContentItem {
|
|
|
this.type = props.type;
|
|
|
this.title = props.title;
|
|
|
this.text = props.text;
|
|
|
+
|
|
|
+ if (props.date) {
|
|
|
+ this.date = new Date(props.date);
|
|
|
+ } else {
|
|
|
+ this.date = new Date();
|
|
|
+ }
|
|
|
|
|
|
if (props.myTags) {
|
|
|
this.myTagsWithoutAll = props.myTags.filter(x => x !== 'all');
|