Skip to content

Commit

Permalink
Merge pull request #20 from innovativeinnovation/fix-photo-url
Browse files Browse the repository at this point in the history
Fix photo url
  • Loading branch information
williambelle committed May 5, 2019
2 parents d148c45 + 3e5ec59 commit b8fbf1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ exports.hasPhoto = (sciper) => {
return Promise.reject(new TypeError('Expected a sciper'));
}

const url = PHOTO_URL + sciper;
const url = PHOTO_URL + sciper + '.jpg';

return new Promise((resolve, reject) => {
got(url).then((response) => {
Expand Down
4 changes: 2 additions & 2 deletions test/test-photo.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ describe('epfl-people-api hasPhoto', function () {
});
});

it('should find photo of Mathilda Jeanneret', () => {
return epflPeopleApi.hasPhoto(275746).then((hasPhoto) => {
it('should find photo of Anastasiia Oryshchuk', () => {
return epflPeopleApi.hasPhoto(278890).then((hasPhoto) => {
hasPhoto.should.equal(true);
});
});
Expand Down

0 comments on commit b8fbf1e

Please sign in to comment.