Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bradley Wood
rust-gitlab
Commits
0c28ad69
Commit
0c28ad69
authored
Mar 31, 2017
by
Ben Boeckel
Browse files
gitlab: fix return types for hook queries
These actually return `ProjectHook` entities.
parent
77f3d36f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/gitlab.rs
View file @
0c28ad69
...
...
@@ -160,12 +160,12 @@ impl Gitlab {
}
/// Get a project's hooks.
pub
fn
hooks
(
&
self
,
project
:
ProjectId
)
->
Result
<
Vec
<
Hook
>>
{
pub
fn
hooks
(
&
self
,
project
:
ProjectId
)
->
Result
<
Vec
<
Project
Hook
>>
{
self
._get_paged
(
&
format!
(
"projects/{}/hooks"
,
project
))
}
/// Get a project hook.
pub
fn
hook
(
&
self
,
project
:
ProjectId
,
hook
:
HookId
)
->
Result
<
Hook
>
{
pub
fn
hook
(
&
self
,
project
:
ProjectId
,
hook
:
HookId
)
->
Result
<
Project
Hook
>
{
self
._get
(
&
format!
(
"projects/{}/hooks/{}"
,
project
,
hook
))
}
...
...
@@ -190,7 +190,7 @@ impl Gitlab {
}
/// Add a project hook.
pub
fn
add_hook
(
&
self
,
project
:
ProjectId
,
url
:
&
str
,
events
:
WebhookEvents
)
->
Result
<
Hook
>
{
pub
fn
add_hook
(
&
self
,
project
:
ProjectId
,
url
:
&
str
,
events
:
WebhookEvents
)
->
Result
<
Project
Hook
>
{
let
mut
flags
=
Self
::
event_flags
(
events
);
flags
.push
((
"url"
,
url
));
...
...
Write
Preview
Supports
Markdown
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