mirror of
https://github.com/MrSedan/neuro-reply-website.git
synced 2026-01-14 12:49:41 +03:00
Added edit_timestamp col to post
This commit is contained in:
@@ -22,6 +22,9 @@ export class Post {
|
||||
@Column({ type: 'timestamptz' })
|
||||
public timestamp!: Date;
|
||||
|
||||
@Column({ type: 'timestamptz', nullable: true })
|
||||
public edit_timestamp?: Date;
|
||||
|
||||
@Column({ nullable: false })
|
||||
public from_user_id!: string;
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ export class PostService {
|
||||
}
|
||||
if (post.text !== data.text) {
|
||||
post.text = data.text;
|
||||
post.timestamp = new Date();
|
||||
post.edit_timestamp = new Date();
|
||||
await this.postRepository.save(post);
|
||||
}
|
||||
return post;
|
||||
|
||||
Reference in New Issue
Block a user