Skip to content

Commit

Permalink
Bugfix Post now return post id data (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
NurfitraPujo authored Sep 3, 2021
1 parent ad86013 commit ae2a28b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions models/post.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class Post
include PostError

def initialize(post_data = {})
@id = post_data[:id]
@username = post_data[:username]
@text = post_data[:text]
@timestamp = post_data[:timestamp] || DateTime.now
Expand Down

0 comments on commit ae2a28b

Please sign in to comment.