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

upgrade-to-v3 devise syntax #2205

Merged
merged 1 commit into from
May 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions guides/upgrade-to-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,14 @@ export default class ApplicationAdapter extends JSONAPIAdapter.extend(DataAdapte
// app/adapters/application.js

// Devise
import DS from 'ember-data';
import JSONAPIAdapter from '@ember-data/adapter/json-api';
import { inject as service } from '@ember/service';
import { computed } from '@ember/object';
import DataAdapterMixin from "ember-simple-auth/mixins/data-adapter-mixin";

export default class ApplicationAdapter extends JSONAPIAdapter.extend(DataAdapterMixin) {
@service session;

// defaults
// identificationAttributeName: 'email'
// tokenAttributeName: 'token'
Expand All @@ -148,8 +150,8 @@ export default class ApplicationAdapter extends JSONAPIAdapter.extend(DataAdapte
}

return headers;
}),
});
};
};
```

### Expect the whole Fetch API response on rejected authentications
Expand Down