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

Likes Array Of Users in Post and Comment #134

Merged
merged 7 commits into from
Jul 6, 2018
Merged

Likes Array Of Users in Post and Comment #134

merged 7 commits into from
Jul 6, 2018

Conversation

shivamarora96
Copy link
Collaborator

Users who liked the post can be traced using Likes array in JSON

Users who have liked the post and comment can be traced
@shivamarora96
Copy link
Collaborator Author

#106

@shivamarora96
Copy link
Collaborator Author

@tharindupr kindly review this PR 😄

@psnmissaka
Copy link
Collaborator

@shivamarora96 currently if the user likes the same post twice it counts as two votes. We have to limit the user from liking a post more than once. We should probably handle that scenario as well

@shivamarora96
Copy link
Collaborator Author

@psnmissaka Yeah But this PR would solve that problem

if(check === -1){
result.likes.push(currentUserId);
result.save();
return returnWithResponse.configureReturnData({ status: 200, success: true, result: `${currentUserId}: user liked the post-${currentPostId}`}, response);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@psnmissaka this would solve the double liking issue

Copy link
Collaborator

@psnmissaka psnmissaka Jul 5, 2018

Choose a reason for hiding this comment

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

Great! I didn't see it.
@ntbandara3 update the front-end accordingly. If someone has liked a post and presses the like button again then trigger the unlike.

Copy link
Contributor

Choose a reason for hiding this comment

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

@psnmissaka sure. working on it.

shivamarora96 and others added 2 commits July 6, 2018 11:34
* structuring the front end with angualr 4

* New angular2 branch commit

* buidling up the strucure and routes

* Added feed component

* new file structure

* added boostrap to be used for grid layout

* UI devlopment in the home page

* Common feed basic structure and post service

* component to view a particular post

* Added the login layer for the app. Login page needs some customizing

* changed the root travis and travis in front end

* removed unnecessary script from angular-cli.json

* redesigned the login page

* login button font change

* button to add a stack

* created the create post component and the route to it

* created the create post component and the route to it

* created the stack service

* Added some response headers to the API endpoint api/orgs

* create post related component creation and few changes in the auth services

* Profile detail UI created

* Create Post UI created

* Create post UI change: Added material components

* Profile UI changes

* Common Feed and Post UI changes

* Fixed merge conflict in travis.yml

* Fixed merge conflicts in server.js

* Fixed merge conflict in routes.js

* Added UI elements to profile
Table to view number of posts, comments and likes by a particular user

* Sidebar style changes

* Navigation and Side Bar changes

* Set height in the description field

* Removed double quotes

* Removed duplicate dependency imports

* Fixed styling in top navigation bar

* Get all subscribed stacks by user service implemented

* Changed API endpoint URL

* Create Post implementations

* Create Post issues fixed

* Vote up and Vote down functions implemented

* WIP: Post UI changes and vote function integrated

* Text wrap in description

* Commenting on posts implemented

* Token Based OAuth 2.0 Github Added

Authentication is added to the application using PassportJS and OAuth 2.0 Github

* NPM Packages Updated

* Implemented profile information retreiving from github

* Fixed issue in profile

* Fixed issue in profile - _body in Response error

* Implemented snackbar messages for create post function

* Added required fields marks in the create post form

* Fixed conflicts

* Added progress bar when loading the profile info

Removed github service and implemented the common profile service

* Fixed issue in showSnackBar function

* Fixed issue in creating a post

* Removed console logs

* Fixed issue in post detailed view

* Implemented voting on post and comments

* PassportJS file Well Formated

* AuthJS well formated
@shivamarora96
Copy link
Collaborator Author

@psnmissaka changes Made. Kindly review it

@psnmissaka psnmissaka merged commit f83aebe into scorelab:master Jul 6, 2018
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.

3 participants