Open appinteractive opened 6 years ago
For the record: @appinteractive and I covered this issue in our online meeting.
I set up a test to send an ordinary POST request with a supplied userId
to the usersettings and I run into an error "There is no current user to associate".
Test implementation: https://github.com/Human-Connection/API/blob/usersettings_feature/features/step_definitions/steps.js#L131 and https://github.com/Human-Connection/API/blob/usersettings_feature/features/api/usersettings.feature
The error we're reaching is in a plugin: https://github.com/feathersjs-ecosystem/feathers-authentication-hooks/blob/b3bf5b875de3056d5ff6c34de1120f4fea5db3cb/lib/associate-current-user.js#L19
I noticed that we reach this error many times during database seeding. So the assumption is that I stumbled upon another bug(?)
Just save and load it from the UserSettings