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

WIP: add reporting feature #65

Closed

Conversation

janikga
Copy link
Collaborator

@janikga janikga commented Mar 19, 2020

WIP due to the following issues

  • reporting state is not persisted once the posting is selected and redirected to /offer-help/:postingId --> any suggestions?
  • reporting functionality could not be tested due to the lack of permissions. As this is my first time using Firebase, please double-check this section and/or test that it works if you have the permissions :)

Video Recording

@janikga janikga self-assigned this Mar 19, 2020
@@ -41,6 +42,45 @@ export default function Entry(props) {
setDeleted(true);
};

const reportEntry = async event => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

would be lovely if someone with more firebase knowledge than me could double-check this!

Copy link
Collaborator

@kenodressel kenodressel left a comment

Choose a reason for hiding this comment

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

Here my ideas to simplify it:
Use documentRef.set this is the upsert function
To add a uid to the array we could use https://cloud.google.com/firestore/docs/manage-data/add-data#update_elements_in_an_array
Then this can all be done in one query.

@janikga
Copy link
Collaborator Author

janikga commented Mar 20, 2020

@kenodressel updated. I see that the develop branch is set as the new default, should I rebase the PR against it?

@kenodressel
Copy link
Collaborator

@jagaSto yes please :)

@janikga janikga changed the base branch from master to develop March 20, 2020 19:33
@janikga
Copy link
Collaborator Author

janikga commented Mar 20, 2020

I'll make a new PR since Entry.js does not exist anymore :D

@kenodressel
Copy link
Collaborator

I think this makes sense

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.

Add reporting feature for malicious posts
2 participants