diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-07-30 11:41:59 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-07-30 11:41:59 +0200 |
commit | 1c7a8b8c27398250983bf4329007f6971df65f34 (patch) | |
tree | cb6a006dbf3abfece03cd6e76cf47750cbf16d54 | |
parent | 4fb6ddfe06164c211f22e69fdec0b248bc61f6b4 (diff) | |
download | gitlab-ce-1c7a8b8c27398250983bf4329007f6971df65f34.tar.gz |
Fix docs
-rw-r--r-- | doc/api/users.md | 12 | ||||
-rw-r--r-- | spec/requests/api/users_spec.rb | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/doc/api/users.md b/doc/api/users.md index 9ac55d3f09e..7ba2db248ff 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -434,9 +434,9 @@ Parameters: - `uid` (required) - id of specified user -## Single SSH key +## Single email -Get a single key. +Get a single email. ``` GET /user/emails/:id @@ -444,7 +444,7 @@ GET /user/emails/:id Parameters: -- `id` (required) - The ID of an SSH key +- `id` (required) - email ID ```json { @@ -472,7 +472,7 @@ Parameters: } ``` -Will return created key with status `201 Created` on success. If an +Will return created email with status `201 Created` on success. If an error occurs a `400 Bad Request` is returned with a message explaining the error: ```json @@ -498,7 +498,7 @@ Parameters: - `id` (required) - id of specified user - `email` (required) - email address -Will return created key with status `201 Created` on success, or `404 Not found` on fail. +Will return created email with status `201 Created` on success, or `404 Not found` on fail. ## Delete email for current user @@ -527,7 +527,7 @@ Parameters: - `uid` (required) - id of specified user - `id` (required) - email ID -Will return `200 OK` on success, or `404 Not found` if either user or key cannot be found. +Will return `200 OK` on success, or `404 Not found` if either user or email cannot be found. ## Block user diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb index 7fa6aebca0b..f2aa369985e 100644 --- a/spec/requests/api/users_spec.rb +++ b/spec/requests/api/users_spec.rb @@ -389,7 +389,7 @@ describe API::API, api: true do before { admin } it "should not create invalid email" do - post api("/users/#{user.id}/emails", admin), { } + post api("/users/#{user.id}/emails", admin), {} expect(response.status).to eq(400) expect(json_response['message']).to eq('400 (Bad request) "email" not given') end |