Skip to content

Commit 1afb3a1

Browse files
committed
remove the use of unused API_HOST
1 parent 68cddff commit 1afb3a1

6 files changed

Lines changed: 2 additions & 24 deletions

File tree

app/routes/application.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { service } from '@ember/service';
22
import Route from '@ember/routing/route';
3-
import { set } from '@ember/object';
43
import ENV from 'ember-api-docs/config/environment';
54
import { isDestroying, isDestroyed } from '@ember/destroyable';
65

@@ -28,8 +27,8 @@ export default class ApplicationRoute extends Route {
2827
if (!this.fastboot.isFastBoot) {
2928
this.router.on('routeDidChange', this.trackPage);
3029

31-
/* Hax from https://github.com/DockYard/ember-router-scroll/issues/263
32-
to handle router scroll behavior when the page was initially served
30+
/* Hax from https://github.com/DockYard/ember-router-scroll/issues/263
31+
to handle router scroll behavior when the page was initially served
3332
with fastboot
3433
*/
3534
this.routerScroll.set('preserveScrollPosition', true);
@@ -52,7 +51,6 @@ export default class ApplicationRoute extends Route {
5251
};
5352

5453
async afterModel() {
55-
set(this, 'headData.cdnDomain', ENV.API_HOST);
5654
await this.legacyModuleMappings.initMappings();
5755
return super.afterModel(...arguments);
5856
}

app/services/head-data.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@ export default class HeadDataService extends Service {
88
@tracked urlVersion;
99
@tracked canonicalUrl;
1010
@tracked description;
11-
@tracked cdnDomain;
1211
}

app/templates/head.hbs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<link rel="dns-prefetch" href="{{this.model.cdnDomain}}">
2-
31
{{#if this.model.description}}
42
<meta name="description" content={{this.model.description}}>
53
<meta property="og:description" content={{this.model.description}}>

config/environment.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ module.exports = function (environment) {
1212
rootURL: '/',
1313
routerRootURL: '/',
1414
locationType: 'history',
15-
API_HOST: process.env.API_HOST || 'https://api-store.emberjs.com',
1615
EmberENV: {
1716
EXTEND_PROTOTYPES: false,
1817
FEATURES: {

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"lint:hbs:fix": "ember-template-lint . --fix",
2626
"lint:js": "eslint . --cache",
2727
"lint:js:fix": "eslint . --fix",
28-
"start:local": "API_HOST=http://localhost:5050 ember serve",
2928
"start": "ember serve",
3029
"test:ember": "ember test"
3130
},

tests/acceptance/head-test.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { visit } from '@ember/test-helpers';
2-
import ENV from 'ember-api-docs/config/environment';
32
import { module, test } from 'qunit';
43

54
import { setupApplicationTest } from 'ember-qunit';
@@ -25,18 +24,4 @@ module('Acceptance | head', function (hooks) {
2524
await visit('/');
2625
assert.dom('link[rel=canonical]', this.head).doesNotExist();
2726
});
28-
29-
test('dns prefetch should be populated', async function (assert) {
30-
await visit('/ember/release/classes/Application');
31-
assert
32-
.dom('link[rel=dns-prefetch]', this.head)
33-
.hasAttribute('href', ENV.API_HOST);
34-
});
35-
36-
test('dns prefetch should be populated when root url visited', async function (assert) {
37-
await visit('/');
38-
assert
39-
.dom('link[rel=dns-prefetch]', this.head)
40-
.hasAttribute('href', ENV.API_HOST);
41-
});
4227
});

0 commit comments

Comments
 (0)