20 Commits

Author SHA1 Message Date
mattwr18
f5545e3976 Fix middleware/spec 2019-11-29 19:45:34 +01:00
mattwr18
5d63dda6ee Refactor validateReport/Review
- Don't throw error if a report already exists since we use MERGE and
that does not create a new resource if it exists. That is tested at the
neo4j(database) level.
- We also have a test to make in reports.spec.js that no duplicate is
created to ensure we didn't make some error on our part.
- Fix some faulty logic in validateReview
2019-11-29 18:47:41 +01:00
mattwr18
2f249a73c5 Rename REPORTED Claim to FILED Report 2019-11-26 15:35:48 +01:00
Wolfgang Huß
99af6cbf8a Implement displaying multiple claims in the frontend 2019-11-22 18:40:51 +01:00
Wolfgang Huß
9a7774ce86 Implement review validation with validateReview 2019-11-22 15:19:49 +01:00
Wolfgang Huß
526e4c642b Merge branch 'master' of github.com:Human-Connection/Human-Connection into 1710-list-and-protocol-moderation 2019-11-08 08:28:47 +01:00
Youri Seichter
d262ed678c close all open sessions 2019-11-06 18:32:25 +01:00
Wolfgang Huß
21e82d2ea5 Get decide mutation to work
- Tests are not fully working yet!
2019-10-30 19:07:51 +01:00
Wolfgang Huß
7b3224327e Prepare backend for next implementation step 2019-10-30 13:51:00 +01:00
mattwr18
e8c6941142 Follow @roschaefer's PR review suggestions
- disable button if form.reasonCategory is falsy
- extract valuesReasonCategoryOptions to global constant
- extract reasonCategoryOptions to created lifecycle hook to keep data()
clean and use map
- extract formSchema to components/utils and test
- remove validator from formSchema and validate based on "Deep Rules" https://github.com/yiminghe/async-validator#deep-rules
- Use v-model to update reasonCategory and reasonDescription
- default to error message in English from backend
- Update template slot to use new syntax
2019-10-15 20:28:25 +02:00
mattwr18
faf0a15aee Update to use enum in tests, seed data, etc, refactor resolver
- Extract validations to the validations middleware to clean it up
- Remove resourceId since it throws an error in the mutation if the user
asks for it back, and the resourceId is returned in post/comment/user.id
- use writeTxResultPromise to benefit from automatic retries
- more descriptive variable naming
- extract cypher query to make db manipulation into script so that it
can be run from the command line, at least locally.
2019-10-14 21:07:55 +02:00
roschaefer
1b5d91bfd2 Refactor post spec, implement soft delete, fix bug
I think the validation for categories was too complex and the graphql
query 'PostEmotionsByCurrentUser' was erroneously allowed for
unauthenticated users.
2019-09-03 21:28:29 +02:00
Matt Rider
abbfc6d757 Remove commented out, unneeded code 2019-08-23 11:30:20 +02:00
Matt Rider
773779e5f1 Fix UpdatePost resolver/validations 2019-08-23 10:57:11 +02:00
Matt Rider
555c5254bc Add tests, validations for too many categories
- Co-authored-by: Joseph Ngugi <jngugi88@gmail.com>
2019-08-19 17:31:55 +02:00
kachulio1
314dfcf413 Throw error if no categories on post creation
Co-authored-by: mattwr18 <mattwr18@gmail.com>
2019-08-15 17:55:02 +03:00
Alina Beck
0439b4407b remove social media validations from middleware 2019-07-29 17:16:05 +02:00
Matt Rider
1c53c58f42 Add backend validation tests to expose non-validation
- remove validation/index.js as it's not being used
- move validations to validationMiddleware.js where it validates
2019-07-16 14:54:13 -03:00
Matt Rider
ba7e44a762 Refactor CreateComment resolver
- extract out the validations for a valid comment
2019-07-12 08:07:07 -03:00
Robert Schäfer
10ae4abaae Use neode to bring User mutations under control
This commit takes all backend changes for signup and invite feature. I
was working on these features and removed the generated mutations for
type user along the way.
2019-07-03 15:58:42 +02:00