Fix ember-simple-auth deprication
This commit is contained in:
parent
74e59d961d
commit
11b43f6a39
4 changed files with 26 additions and 0 deletions
10
app/routes/application.js
Normal file
10
app/routes/application.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import Route from '@ember/routing/route';
|
||||
import { inject as service } from '@ember/service';
|
||||
|
||||
export default class ApplicationRoute extends Route {
|
||||
@service session;
|
||||
|
||||
async beforeModel() {
|
||||
await this.session.setup();
|
||||
}
|
||||
}
|
||||
2
app/templates/application.hbs
Normal file
2
app/templates/application.hbs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
{{page-title "Application"}}
|
||||
{{outlet}}
|
||||
|
|
@ -12,6 +12,9 @@ module.exports = function (defaults) {
|
|||
'ember-power-select': {
|
||||
theme: false,
|
||||
},
|
||||
'ember-simple-auth': {
|
||||
useSessionSetupMethod: true,
|
||||
},
|
||||
});
|
||||
|
||||
return require('@embroider/compat').compatBuild(app, Webpack, {
|
||||
|
|
|
|||
11
tests/unit/routes/application-test.js
Normal file
11
tests/unit/routes/application-test.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'meilisearch-admin/tests/helpers';
|
||||
|
||||
module('Unit | Route | application', function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup('route:application');
|
||||
assert.ok(route);
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue