Skip to content

Commit

Permalink
Fixed cap API parameter string (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish authored Apr 22, 2021
1 parent 9d36d10 commit 06cdedd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ migration_tags: { }
migration_group: su_stanford_person
label: 'Stanford Person Importer'
source:
plugin: url
constants:
status: 1
type: stanford_person
Expand Down
2 changes: 1 addition & 1 deletion modules/stanford_person_importer/src/Cap.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public function getSunetUrl($sunetids) {
// Cap API default to 10 results. Send the argument to collect more if
// there are more sunets to get results for.
if ($count > 10) {
$url .= "?ps=$count";
$url .= "&ps=$count";
}
return $url;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function testUrls() {

$sunets = implode(',', array_fill(0, 20, 'foo'));
$url = $this->service->getSunetUrl($sunets);
$this->assertEquals("https://cap.stanford.edu/cap-api/api/profiles/v1?uids=$sunets?ps=20", $url);
$this->assertEquals("https://cap.stanford.edu/cap-api/api/profiles/v1?uids=$sunets&ps=20", $url);
}

/**
Expand Down

0 comments on commit 06cdedd

Please sign in to comment.