From e4d2f9972cef6268166a31c20c062b2bf42d9ed7 Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Wed, 17 Feb 2016 21:23:14 +0100 Subject: [PATCH] Change `last_contact` to `contacted_at` --- doc/api/runners.md | 4 ++-- lib/api/entities.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/runners.md b/doc/api/runners.md index 276c058e642..8840b8abdcc 100644 --- a/doc/api/runners.md +++ b/doc/api/runners.md @@ -116,7 +116,7 @@ Example response: "description": "test-1-20150125", "id": 6, "is_shared": false, - "last_contact": "2016-01-25T16:39:48.066Z", + "contacted_at": "2016-01-25T16:39:48.066Z", "name": null, "platform": null, "projects": [ @@ -166,7 +166,7 @@ Example response: "description": "test-1-20150125-test", "id": 6, "is_shared": false, - "last_contact": "2016-01-25T16:39:48.066Z", + "contacted_at": "2016-01-25T16:39:48.066Z", "name": null, "platform": null, "projects": [ diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 3908e2a83c8..c31ef5352dd 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -380,7 +380,7 @@ module API class RunnerDetails < Runner expose :tag_list expose :version, :revision, :platform, :architecture - expose :contacted_at, as: :last_contact + expose :contacted_at expose :token, if: lambda { |runner, options| options[:current_user].is_admin? || !runner.is_shared? } expose :projects, with: Entities::ForkedFromProject do |runner, options| if options[:current_user].is_admin?