Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add like and reshare services #7337

Closed

Conversation

svbergerem
Copy link
Member

No description provided.

Copy link
Member

@SuperTux88 SuperTux88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small changes.

{positive: 1, post_id: @target.id}
}
let(:dislike_hash) {
{positive: 0, post_id: @target.id}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just drop this dislike stuff (also positive on like_hash), because it is not used anywhere.

@reshare = current_user.build_post(:reshare, :root_guid => params[:root_guid])
end
post = Post.where(guid: params[:root_guid]).first
root_guid = (post.is_a? Reshare) ? post.absolute_root.guid : params[:root_guid]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would do that in the service, not in the controller.

@SuperTux88 SuperTux88 added this to the 0.6.4.0 milestone Feb 18, 2017
@SuperTux88
Copy link
Member

Merged as e3c9e9c, 436934e, 44b616e, e74b524, 2772cb6 and f931248

Thanks :)

@svbergerem svbergerem deleted the like-and-reshare-services branch February 18, 2017 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants