This repository has been archived by the owner on Apr 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit 01b0e41.
- Loading branch information
Showing
11 changed files
with
14 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,7 +84,7 @@ curl -v \ | |
{ | ||
"uid": "6d940dd41e636cc156074109b8092f96", | ||
"email": "[email protected]", | ||
"avatar": "https://firefoxusercontent.com/a9bff302615cd015692a099f691205cc" | ||
"avatar": "https://secure.gravatar.com/avatar/6d940dd41e636cc156074109b8092f96" | ||
} | ||
``` | ||
|
||
|
@@ -166,27 +166,15 @@ curl -v \ | |
"https://profile.accounts.firefox.com/v1/avatar" | ||
``` | ||
|
||
|
||
#### Response | ||
|
||
```json | ||
{ | ||
"id": "a9bff302615cd015692a099f691205cc", | ||
"avatar": "https://firefoxusercontent.com/a9bff302615cd015692a099f691205cc" | ||
} | ||
``` | ||
|
||
|
||
#### Response (no avatar set) | ||
#### Response | ||
|
||
```json | ||
{ | ||
"id": "00000000000000000000000000000000", | ||
"avatar": "https://firefoxusercontent.com/00000000000000000000000000000000" | ||
"id": "81625c14128d46c2b600e74a017fa4a8", | ||
"url": "https://secure.gravatar.com/avatar/6d940dd41e636cc156074109b8092f96" | ||
} | ||
``` | ||
|
||
|
||
### POST /v1/avatar/upload | ||
|
||
- scope: `profile:avatar:write` | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,12 +13,8 @@ const checksum = require('checksum'); | |
|
||
const assert = require('insist'); | ||
const P = require('../lib/promise'); | ||
const config = require('../lib/config'); | ||
const avatarShared = require('../lib/routes/avatar/_shared'); | ||
const assertSecurityHeaders = require('./lib/util').assertSecurityHeaders; | ||
|
||
const DEFAULT_AVATAR_ID = config.get('img.defaultAvatarId'); | ||
|
||
function randomHex(bytes) { | ||
return crypto.randomBytes(bytes).toString('hex'); | ||
} | ||
|
@@ -77,7 +73,7 @@ describe('/profile', function() { | |
assert.equal(res.statusCode, 200); | ||
assert.equal(res.result.uid, USERID); | ||
assert.equal(res.result.email, '[email protected]'); | ||
assert.equal(res.result.avatar, avatarShared.fxaUrl(DEFAULT_AVATAR_ID), 'return default avatar'); | ||
assert.equal(res.result.avatar, null); | ||
assertSecurityHeaders(res); | ||
}); | ||
}); | ||
|
This file was deleted.
Oops, something went wrong.