Patch #15986 ยป api_hooks.patch
app/views/issues/index.api.rsb (working copy) | ||
---|---|---|
30 | 30 |
api.relation(:id => relation.id, :issue_id => relation.issue_from_id, :issue_to_id => relation.issue_to_id, :relation_type => relation.relation_type, :delay => relation.delay) |
31 | 31 |
end |
32 | 32 |
end if include_in_api_response?('relations') |
33 | ||
34 |
call_hook(:view_issues_index_api, :issue => issue) |
|
33 | 35 |
end |
34 | 36 |
end |
35 | 37 |
end |
app/views/issues/show.api.rsb (working copy) | ||
---|---|---|
71 | 71 |
api.user :id => user.id, :name => user.name |
72 | 72 |
end |
73 | 73 |
end if include_in_api_response?('watchers') && User.current.allowed_to?(:view_issue_watchers, @issue.project) |
74 | ||
75 |
call_hook(:view_issues_show_api, :issue => @issue) |
|
74 | 76 |
end |
app/views/timelog/index.api.rsb (working copy) | ||
---|---|---|
13 | 13 |
api.updated_on time_entry.updated_on |
14 | 14 | |
15 | 15 |
render_api_custom_values time_entry.custom_field_values, api |
16 | ||
17 |
call_hook(:view_timelog_index_api, :time_entry => time_entry) |
|
16 | 18 |
end |
17 | 19 |
end |
18 | 20 |
end |
app/views/timelog/show.api.rsb (working copy) | ||
---|---|---|
11 | 11 |
api.updated_on @time_entry.updated_on |
12 | 12 | |
13 | 13 |
render_api_custom_values @time_entry.custom_field_values, api |
14 | ||
15 |
call_hook(:view_timelog_show_api, :time_entry => @time_entry) |
|
14 | 16 |
end |
app/views/users/index.api.rsb (working copy) | ||
---|---|---|
10 | 10 |
api.last_login_on user.last_login_on |
11 | 11 | |
12 | 12 |
render_api_custom_values user.visible_custom_field_values, api |
13 | ||
14 |
call_hook(:view_users_index_api, :user => user) |
|
13 | 15 |
end |
14 | 16 |
end |
15 | 17 |
end |
app/views/users/show.api.rsb (working copy) | ||
---|---|---|
28 | 28 |
attrs = {:id => member_role.role.id, :name => member_role.role.name} |
29 | 29 |
attrs.merge!(:inherited => true) if member_role.inherited_from.present? |
30 | 30 |
api.role attrs |
31 |
end
|
|
31 |
end |
|
32 | 32 |
end |
33 | 33 |
end |
34 | 34 |
end if membership.project |
35 | 35 |
end |
36 | 36 |
end if include_in_api_response?('memberships') && @memberships |
37 | ||
38 |
call_hook(:view_users_show_api, :user => @user) |
|
37 | 39 |
end |