Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
1c7a8b8c
Commit
1c7a8b8c
authored
Jul 30, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix docs
parent
4fb6ddfe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
doc/api/users.md
doc/api/users.md
+6
-6
spec/requests/api/users_spec.rb
spec/requests/api/users_spec.rb
+1
-1
No files found.
doc/api/users.md
View file @
1c7a8b8c
...
...
@@ -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
...
...
spec/requests/api/users_spec.rb
View file @
1c7a8b8c
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment