Robert Schäfer
fc4e9f40b3
Whitelist queries/mutations, fix backend tests
2019-06-13 23:29:29 +02:00
Robert Schäfer
113cf04c60
Fix build
2019-06-13 00:26:20 +02:00
Robert Schäfer
4166936e5f
Fix #800
...
Ok, so apparently all we have to do is to remove the `/api` prefix from
fixImageUrlMiddleware. I guess that's just a leftover.
2019-06-12 23:27:43 +02:00
Robert Schäfer
54c7c204c2
Run yarn run lint --fix
2019-06-11 23:10:26 +02:00
Robert Schäfer
c4316a81de
Refactor backend to use filterParams directly
...
Revert this commit to implement a later performance improvement
2019-06-06 15:43:43 +02:00
Robert Schäfer
93107bc0f8
Fix lint
2019-06-05 18:39:11 +02:00
Robert Schäfer
16ef304d70
Follow suggestions by @mattwr18
2019-06-05 18:37:19 +02:00
Robert Schäfer
d59c43330b
Rename value of enum type to following
...
As discussed in our daily standup with @mattwr18
2019-06-05 18:34:02 +02:00
Robert Schäfer
ed0c9b775b
Implement+test filterBubble middleware
...
@Tirokk @ulfgebhardt @ogerly @mattwr18
This is interesting because I found out that `neo4j-graphql-js` allows
to customize graphql queries. If you define it, then it will merge the
other inputs and stuff on top of it. Fair enough!
2019-06-05 17:28:31 +02:00
Robert Schäfer
8e9b0318da
Fix missing check if user is unauthenticated
2019-06-05 17:28:31 +02:00
Robert Schäfer
b9b103b424
Implement+test replaceParams helper method
2019-06-05 17:28:31 +02:00
Robert Schäfer
0289412ba7
DISABLED_MIDDLEWARES only set outside production
...
That way, we don't see verbose logging output on Travis. Setting DEBUG
will have the effect that all calls of `neo4jgraphql` will produce log
output.
2019-06-04 17:33:30 +02:00
97ff6fdb78
Merge branch 'master' into 2019/kw22/refactor_backend_structure
2019-06-03 23:31:26 +02:00
edcc5adb41
corrected paths and include order
2019-06-03 23:11:48 +02:00
Matt Rider
76bca90ede
Merge branch 'master' of github.com:Human-Connection/Human-Connection into 553-delete-comment
2019-06-03 16:55:30 -03:00
6948666cfe
Merge branch 'master' into 2019/kw22/refactor_backend_structure
...
# Conflicts:
# backend/src/middleware/index.js
# backend/src/schema/resolvers/comments.spec.js
# backend/src/schema/resolvers/socialMedia.spec.js
2019-06-03 19:48:47 +02:00
177e33c022
fixed spec include paths
2019-06-03 19:34:58 +02:00
Robert Schäfer
7272c5002d
Merge pull request #725 from Human-Connection/fix_terrible_middleware_bug_in_production
...
Don't remove middlewares in production
2019-06-03 19:27:33 +02:00
Wolfgang Huß
25999a6dfd
Bug fix for User can delete Comments of others
...
Wrote a Jest test for this.
2019-06-03 19:04:40 +02:00
caa6a65f99
removed dotenv.config calls
2019-06-03 18:47:00 +02:00
Robert Schäfer
5866804fd3
Don't remove middlewares in production
...
@ulfgebhardt thank you for pointing out! That was a terrible bug.
2019-06-03 14:14:57 +02:00
4fd2885b26
reference global config
2019-06-03 13:19:08 +02:00
Wolfgang Huß
5bec0f1d72
Refined list deletion functions and started writing custom mutation for DeleteComment and their tests
2019-05-31 15:46:34 +02:00
Robert Schäfer
ffd584ded1
Fix prettier
2019-05-29 12:36:26 +02:00
Matt Rider
1c1d1a67ea
Merge in master
2019-05-23 15:31:05 -03:00
Matt Rider
758bf215ac
Merge branch 'master' of github.com:Human-Connection/Human-Connection into uploads-on-server
2019-05-23 15:26:19 -03:00
cfd0975b24
backend linting
2019-05-23 19:23:03 +02:00
Robert Schäfer
3c22a432e6
Fix lint
2019-05-21 03:08:32 +02:00
Robert Schäfer
2a22aaa907
Fix edge case bug in extractIds
2019-05-21 02:01:00 +02:00
Robert Schäfer
4dbf1b2a2c
UpdateUser with avatarUpload
...
This is a curl request from a folder where I have a file `avatar.jpg`:
```
curl localhost:4000/ \
-F operations='{ "query": "mutation($id: ID!, $file: Upload) { UpdateUser(id: $id, avatarUpload: $file) { id name avatar } }", "variables": { "id": "u3", "file": null } }' \
-F map='{ "0": ["variables.file"] }' \
-F 0=@avatar.jpg
```
It uploads the avatar to the public folder. We should
* Write tests
* Change the `user.avatar` url and send it to `/api` in the frontend
2019-05-20 20:35:33 +02:00
Robert Schäfer
81a26e14ff
Fix test case, move spec to the right location
...
@ulfgebhardt : The reason why the test case was failing is pretty
obvious. You forgot to create a user that you want to update. If there
is no user to update, then you get an empty response.
@ulfgebhardt : I moved the spec also in the right directory. You're
testing resolvers, so that's where I moved the `.spec` file.
2019-05-10 17:34:05 +02:00
Robert Schäfer
47d7c615a5
Refactoring: Put all data validations in one place
...
@ulfgebhardt @mattwr18 @tirokk
Here's how I imagined the data validation middleware. If we roll our own
input validations I would suggest to put them all in one place.
@ulfgebhardt this commit is a great example of how tests can speed you
up: Since I can rely on existing tests, I don't have to check the validations
manually. With tests you can refactor with confidence! 👍
2019-05-10 17:13:54 +02:00
82570bef7f
Merge pull request #478 from Human-Connection/2019/kw15/User_can_change_its_username_to_emptystring
...
2019/kw15/user can change its username to emptystring
2019-05-09 15:01:54 +02:00
2cb8d793fb
removed failing test
2019-05-09 14:37:42 +02:00
Robert Schäfer
287a55db9f
Remove test case entirely
...
@ulfgebhardt when I write "Remove test case" I mean indeed removing all
the lines of code of that test case, not only disabling it. Commenting
out code *and pushing it to version control* is a strong anti-pattern. Why?
First, code comments get out of date quickly. "Never trust code comments".
Second: In our example here, it creates anxiety because other contributors might
believe there was a reason why the commented code exists.
Read:
* https://blog.codinghorror.com/coding-without-comments/
* https://www.nayuki.io/page/dont-share-commented-out-code
* https://softwareengineering.stackexchange.com/questions/1/comments-are-a-code-smell
2019-05-07 14:10:12 +02:00
Robert Schäfer
0637d97648
Merge remote-tracking branch 'origin/master' into 2019/kw15/User_can_change_its_username_to_emptystring
2019-05-07 14:09:10 +02:00
3d2ce3960c
added url of conversation
2019-05-07 14:01:43 +02:00
140ba848c7
removed testcase, added todo
2019-05-07 14:00:02 +02:00
Robert Schäfer
ad111f5701
Double-check changed expectations, fix tests
...
See:
https://github.com/Human-Connection/Human-Connection/pull/478/files#r281267486
> We found the reason for it: If you have an exclamation mark in the schema e.g.
> email! and the response would e.g. expect the email for each User object, and
> the server does not have an email for the client, then the entire User object
> gets nullified.
2019-05-06 19:26:53 +02:00
9004e923af
removed unnecessary comment block
2019-05-06 13:02:09 +02:00
a71b421933
removed console log
2019-05-06 12:39:53 +02:00
ad05dcf735
frontend tests, backend tests
2019-05-02 17:47:34 +02:00
Wolfgang Huß
b03cbb212a
First Vue design of delete SocialMedia, custom mutation DeleteSocialMedia
...
Backend Jest tests for DeleteSocialMedia
New backend Jest tests for CreateSocialMedia
2019-05-02 17:41:54 +02:00
0be2891858
make email a required field for user, tests for front- & backend
2019-05-02 16:17:16 +02:00
10ef0ab1c4
started backend test, fixed uniqueSlug
2019-04-30 19:05:03 +02:00
6de253fd32
Merge branch 'master' into 2019/kw15/User_can_change_its_username_to_emptystring
...
# Conflicts:
# webapp/components/_mixins/seo.js
# webapp/components/mixins/seo.js
# webapp/layouts/blank.vue
# webapp/layouts/default.vue
# webapp/mixins/seo.js
2019-04-19 12:09:24 +02:00
Matt Rider
fc496aec51
Merge github.com:Human-Connection/Human-Connection into 260-add-comment-form
2019-04-18 19:00:05 -03:00
Matt Rider
0149f30f5f
Fix failing tests, refactor
...
- due to changes made to comments factories, which caused failures
- to use new custom CreateComment resolver syntax to relate a comment to post by passing in the postId
2019-04-17 20:27:35 -03:00
2efc77097f
match specification of Dennis - minimum 3 characters for username, no hint for user to change the username to "Anonymous", Toast error if userdata cannot be changed due to username restrictions, display "Anonymous" if no username is found in database (even tho this is against implemented rules)
2019-04-17 14:49:03 +02:00
e5f98f2cee
Merge branch 'master' into 2019/kw15/User_can_change_its_username_to_emptystring
...
# Conflicts:
# webapp/locales/de.json
# webapp/locales/en.json
# webapp/pages/profile/_id/_slug.vue
2019-04-17 13:59:30 +02:00