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

Revert "Support for schema v2" #200

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 1 addition & 3 deletions .env.dev
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
API_URL_V1=https://api.dev.ror.org/v1
API_URL_V2=https://api.dev.ror.org/v2
API_URL=https://api.dev.ror.org
SENTRY_DSN=https://1c334995f85448b1afa561c8ccf13791@sentry.io/1422597
BASE_URL=https://dev.ror.org
LAUNCH_DARKLY_CLIENT_SIDE_ID=6390f62d05087a11e466bfc9
4 changes: 1 addition & 3 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
API_URL_V1=https://api.ror.org/v1
API_URL_V2=https://api.ror.org/v2
API_URL=https://api.ror.org
SENTRY_DSN=https://1c334995f85448b1afa561c8ccf13791@sentry.io/1422597
BASE_URL=https://ror.org
LAUNCH_DARKLY_CLIENT_SIDE_ID=636d08a3d56cf611cc88019d
4 changes: 1 addition & 3 deletions .env.staging
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
API_URL_V1=https://api.staging.ror.org/v1
API_URL_V2=https://api.staging.ror.org/v2
API_URL=https://api.staging.ror.org
SENTRY_DSN=https://1c334995f85448b1afa561c8ccf13791@sentry.io/1422597
BASE_URL=https://staging.ror.org
LAUNCH_DARKLY_CLIENT_SIDE_ID=636d08a3d56cf611cc88019c
7 changes: 1 addition & 6 deletions app/adapters/application.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import DS from 'ember-data';
import ENV from 'ror-app/config/environment';
import { inject as service } from '@ember/service';
import { computed } from '@ember/object';

export default DS.JSONAPIAdapter.extend({
launchDarkly: service(),
host: computed('launchDarkly.variation', function() {
return this.launchDarkly.variation('v2_ui') ? ENV.API_URL_V2 : ENV.API_URL_V1;
}),
host: ENV.API_URL
});
9 changes: 2 additions & 7 deletions app/adapters/organization.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import DS from 'ember-data';
import ENV from 'ror-app/config/environment';
import { inject as service } from '@ember/service';
import { computed } from '@ember/object';

export default DS.JSONAPIAdapter.extend({
launchDarkly: service(),
host: computed('launchDarkly.variation', function() {
return this.launchDarkly.variation('v2_ui') ? ENV.API_URL_V2 : ENV.API_URL_V1;
}),
host: ENV.API_URL,

urlForFindRecord(id, modelName) {
return `${this.host}/${modelName}s/ror.org/${id}`;
return `${ENV.API_URL}/${modelName}s/ror.org/${id}`;
},

init() {
Expand Down
131 changes: 0 additions & 131 deletions app/components/v2/organization-item.js

This file was deleted.

7 changes: 2 additions & 5 deletions app/models/organization.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import DS from 'ember-data';
export default DS.Model.extend({
meta: DS.attr(),

name: DS.attr('string'), //TODO: Remove this when v1 has been retired
names: DS.attr(),
name: DS.attr('string'),
local: DS.attr('string'),
types: DS.attr(),
links: DS.attr(),
Expand All @@ -16,8 +15,6 @@ export default DS.Model.extend({
country: DS.attr(),
addresses: DS.attr(),
relationships: DS.attr(),
status: DS.attr('string'),
admin: DS.attr(),
locations: DS.attr()
status: DS.attr('string')
});

8 changes: 1 addition & 7 deletions app/routes/application.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import Route from '@ember/routing/route';

export default Route.extend({
beforeModel(){
let user = {
key: 'user-key-123abc',
anonymous: true
};
return this.launchDarkly.initialize(user);
}

});
156 changes: 0 additions & 156 deletions app/templates/components/v2/organization-item.hbs

This file was deleted.

6 changes: 1 addition & 5 deletions app/templates/organizations/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
</div>
<div class="col-md-10 col-sm-12">
{{#each model as |organization|}}
{{#if (variation "v2_ui")}}
{{v2/organization-item model=organization view="list"}}
{{else}}
{{v1/organization-item model=organization}}
{{/if}}
{{organization-item model=organization}}
{{/each}}
</div>
{{#if (gt model.meta.totalPages 1)}}
Expand Down
Loading