fix: 🐛 Session setup method deprecation message (#1374)
* fix: 🐛 Session setup method deprecation message
This commit is contained in:
1 parent
57dd1ac4d3
commit
18325e5126
5 files changed
+14
-3
No files matched your search
@@ -4,7 +4,10 @@ const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
|
||||
|
||||
module.exports = function (defaults) {
|
||||
let app = new EmberAddon(defaults, {
|
||||
// Add options here
|
||||
'ember-simple-auth': {
|
||||
// https://github.com/mainmatter/ember-simple-auth/blob/master/guides/upgrade-to-v4.md#call-sessionsetup-method-in-your-applicationroute
|
||||
useSessionSetupMethod: true,
|
||||
},
|
||||
});
|
||||
|
||||
/*
|
||||
|
||||
@@ -47,7 +47,8 @@ export default class ApplicationRoute extends Route {
|
||||
});
|
||||
}
|
||||
|
||||
beforeModel() {
|
||||
async beforeModel() {
|
||||
await this.session.setup();
|
||||
const theme = this.session.get('data.theme');
|
||||
this.toggleTheme(theme);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,9 @@ module.exports = function (defaults) {
|
||||
'ember-cli-babel': {
|
||||
includeExternalHelpers: true,
|
||||
},
|
||||
'ember-simple-auth': {
|
||||
useSessionSetupMethod: true,
|
||||
},
|
||||
babel: {
|
||||
sourceMaps: 'inline',
|
||||
},
|
||||
|
||||
@@ -24,7 +24,8 @@ export default class ApplicationRoute extends Route {
|
||||
* reported by the main process. If they differ, update the main process
|
||||
* clusterUrl so that the renderer's CSP can be rewritten to allow requests.
|
||||
*/
|
||||
beforeModel() {
|
||||
async beforeModel() {
|
||||
await this.session.setup();
|
||||
const theme = this.session.get('data.theme');
|
||||
this.toggleTheme(theme);
|
||||
return this.clusterUrl.updateClusterUrl();
|
||||
|
||||
@@ -8,6 +8,9 @@ module.exports = function (defaults) {
|
||||
'ember-cli-babel': {
|
||||
includeExternalHelpers: true,
|
||||
},
|
||||
'ember-simple-auth': {
|
||||
useSessionSetupMethod: true,
|
||||
},
|
||||
babel: {
|
||||
sourceMaps: 'inline',
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user