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

The references object should not be addressed directly. #2

Open
scheidelerl opened this issue Dec 7, 2018 · 0 comments
Open

The references object should not be addressed directly. #2

scheidelerl opened this issue Dec 7, 2018 · 0 comments

Comments

@scheidelerl
Copy link
Collaborator

scheidelerl commented Dec 7, 2018

The API model contrain 'preferred' and '#text' as a clear statement to address it.

basic.app/app.js

Lines 308 to 313 in 0ffccef

obj[id_element].push({
// TODO: API Model constrain: preferred
'preferred': 'NO',
// TODO: API Model constrain: #text
'#text': config.v.identifierBaseURL + ref_id
});

basic.app/app.js

Lines 320 to 327 in 0ffccef

var ref_new_idx = obj[config.v.identifierElement].findIndex(function (ref) {
// TODO: API Model constrain: #text
return ref['#text'] === config.v.identifierBaseURL + ref_id
});
var ref_old_idx = obj[config.v.identifierElement].findIndex(function (ref) {
// TODO: API Model constrain: preferred
return ref.preferred === 'YES'
});

return el['#text'] == config.v.identifierBaseURL + ref_id;

return el['#text'] == config.v.identifierBaseURL + ref_id;

basic.app/cards.js

Lines 83 to 92 in 0ffccef

var pref_ref_object = local_object[config.v.identifierElement].find(function (e) {
// TODO: API constrainet: preferred
return e.preferred === 'YES'
});
// TODO: API constrainet: #text
if (pref_ref_object != undefined && pref_ref_object[ '#text'] === config.v.identifierBaseURL + id) {
pref_ref = 'YES';
} else {
pref_ref = 'NO'
}

@scheidelerl scheidelerl changed the title The response of the references should not be addressed directly. The element of references should not be addressed directly. Dec 7, 2018
@scheidelerl scheidelerl changed the title The element of references should not be addressed directly. The references object should not be addressed directly. Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant