Add unique ID per post and an index to the db for that

This commit is contained in:
“bobbydigitales”
2024-03-24 22:51:33 -07:00
parent b07a93246f
commit 49a2c8b011
4 changed files with 7 additions and 2 deletions

View File

@@ -16,6 +16,7 @@ declare let marked: any;
class Post {
post_timestamp: Date;
post_id: string;
author: string;
author_id: string;
text: string;
@@ -27,6 +28,7 @@ class Post {
constructor(author: string, author_id: string, text: string, post_timestamp: Date, imageData: ArrayBuffer | null = null, importedFrom: "twitter" | null = null, importSource: any = null) {
this.post_timestamp = post_timestamp;
this.post_id = generateID();
this.author = author;
this.author_id = author_id;