Skip to content

Commit

Permalink
enable local-source-description-references
Browse files Browse the repository at this point in the history
  • Loading branch information
justincy committed Nov 11, 2015
1 parent 158bd55 commit e6f153f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
10 changes: 7 additions & 3 deletions src/modules/sources.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,16 @@ FS.prototype.getSourceRefsQuery = function(url, params) {
* @param {String} url url of the source references query resource of a source description
* @return {Object} promise for the response
*/
FS.prototype.getSourceAttachments = function(url){
FS.prototype.getSourceAttachments = function(sourceUrl){
// TODO: update when the link in the tree collection is fixed
// https://groups.google.com/a/ldsmail.net/d/msg/FSDN/fQaQWkRUQ2o/bIG54_fzBwAJ
// Last checked 10/10/2015
var self = this;
return this.getSourceRefsQuery('/platform/tree/source-references', { source: url }).then(function(response){
//
// TODO: Remove the feature header when it's been activated
var self = this,
params = { source: sourceUrl },
headers = {'X-FS-Feature-Tag':'local-source-description-references'};
return this.getSourceRefsQuery('/platform/tree/source-references', params, headers).then(function(response){
var data = maybe(response.getData());
utils.forEach(data.sourceDescriptions, function(source, index, obj){
obj[index] = self.createSourceDescription(source);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"modified" : 1445377016431,
"changeMessage" : "shows family and residence"
},
"description" : "https://familysearch.org/platform/sources/descriptions/9DPJ-RGW"
"description" : "#9DPJ-RGW"
} ]
}, {
"id" : "LKRR-NCC",
Expand All @@ -45,7 +45,7 @@
"modified" : 1444771237321,
"changeMessage" : "shows family and residence. Also right under their names is their other son, Richard and his wife on this census record."
},
"description" : "https://familysearch.org/platform/sources/descriptions/9DLV-WT9"
"description" : "#9DLV-WT9"
} ]
}, {
"id" : "2Z96-BTS",
Expand All @@ -69,7 +69,7 @@
"modified" : 1444764674775,
"changeMessage" : "shows that they were married within the year and their residence"
},
"description" : "https://familysearch.org/platform/sources/descriptions/9DLJ-WP8"
"description" : "#9DLJ-WP8"
} ]
} ],
"sourceDescriptions" : [ {
Expand Down

0 comments on commit e6f153f

Please sign in to comment.