Bug 1084490 - Fix Bugzilla::WebService::BugUserLastVisit->get & correct POD

r=dkl a=glob
parent c30fc43f
...@@ -69,10 +69,10 @@ sub get { ...@@ -69,10 +69,10 @@ sub get {
$user->visible_bugs([grep /^[0-9]$/, @$ids]); $user->visible_bugs([grep /^[0-9]$/, @$ids]);
} }
my @last_visits = @{ $user->last_visits }; my @last_visits = @{ $user->last_visited };
if ($ids) { if ($ids) {
# remove bugs that we arn't interested in if ids is passed in. # remove bugs that we are not interested in if ids is passed in.
my %id_set = map { ($_ => 1) } @$ids; my %id_set = map { ($_ => 1) } @$ids;
@last_visits = grep { $id_set{ $_->bug_id } } @last_visits; @last_visits = grep { $id_set{ $_->bug_id } } @last_visits;
} }
...@@ -167,20 +167,13 @@ B<EXPERIMENTAL> ...@@ -167,20 +167,13 @@ B<EXPERIMENTAL>
=item B<Description> =item B<Description>
Get the last visited timestamp for one or more specified bug ids or get a Get the last visited timestamp for one or more specified bug ids.
list of the last 20 visited bugs and their timestamps.
=item B<REST> =item B<REST>
To return the last visited timestamp for a single bug id: To return the last visited timestamp for a single bug id:
GET /rest/bug_visit/<bug-id> GET /rest/bug_user_last_visit/<bug-id>
To return more than one bug timestamp or the last 20:
GET /rest/bug_visit
The returned data format is the same as below.
=item B<Params> =item B<Params>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment