{"action":"created","comment":{"url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/pulls/comments/43234986","id":43234986,"diff_hunk":"@@ -1,26 +1,42 @@\n-﻿using BookingRoom.Models.GoogleCalendar;\n+﻿using System.Collections.Generic;\n+using BookingRoom.Models.GoogleCalendar;\n using System.Net;\n using System.Net.Http;\n using System.Web.Http;\n using BookingRoom.Models.GoogleEvent;\n using GoogleCalendarService;\n using BookingRoom.Filters;\n+using Google.Apis.Calendar.v3.Data;\n+using GoogleCalendarService.Manager;\n \n namespace BookingRoom.Controllers\n {\n     [GoogleExceptionFilter]\n     public class UpdateEventController : BaseEventController\n     {\n-        public UpdateEventController(BookingService bookingService)\n-            : base(bookingService)\n+        public UpdateEventController(BookingService bookingService, EventManager manager)\n+            : base(bookingService, manager)\n         {\n \n         }\n         [HttpPut]\n-        public HttpResponseMessage UpDateEvent(CalendarEvent eventForUpdate, string eventID)\n+        public HttpResponseMessage UpdateEvent(CalendarEvent eventToUpdate, string eventID)\n         {\n-            BookingService.UpdateEvent(ToEventConverter.ToEvent(eventForUpdate), eventForUpdate.CalendarID, eventID);\n-            return Request.CreateResponse(HttpStatusCode.Created, eventForUpdate);\n+            string timeZone = BookingService.GetTimeZone(eventToUpdate.CalendarID);\n+            Event eventToCheck = ToEventConverter.ToEvent(eventToUpdate, timeZone);\n+            eventToCheck.Id = eventID;\n+            List<Event> conflictedEvents = EventManager.CheckEvent(eventToUpdate.CalendarID, eventToCheck, eventToUpdate.ForcedEvent);\n+            if (conflictedEvents.Count != 0)\n+            {\n+                var unSuccessfulRequest = new { Successful = false, ConflictedList = conflictedEvents };","path":"CalendarApp/BookingRoom/Controllers/UpdateEventController.cs","position":37,"original_position":37,"commit_id":"77566722a38a5dcee471bf35ddc63fc60df8178b","original_commit_id":"77566722a38a5dcee471bf35ddc63fc60df8178b","user":{"login":"oloandriy","id":10503958,"avatar_url":"https://avatars.githubusercontent.com/u/10503958?v=3","gravatar_id":"","url":"https://api.github.com/users/oloandriy","html_url":"https://github.com/oloandriy","followers_url":"https://api.github.com/users/oloandriy/followers","following_url":"https://api.github.com/users/oloandriy/following{/other_user}","gists_url":"https://api.github.com/users/oloandriy/gists{/gist_id}","starred_url":"https://api.github.com/users/oloandriy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oloandriy/subscriptions","organizations_url":"https://api.github.com/users/oloandriy/orgs","repos_url":"https://api.github.com/users/oloandriy/repos","events_url":"https://api.github.com/users/oloandriy/events{/privacy}","received_events_url":"https://api.github.com/users/oloandriy/received_events","type":"User","site_admin":false},"body":"unseccessful","created_at":"2015-10-28T09:53:32Z","updated_at":"2015-10-28T09:53:32Z","html_url":"https://github.com/OrestHurskiy/CalenderApp/pull/11#discussion_r43234986","pull_request_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/OrestHurskiy/CalenderApp/pulls/comments/43234986"},"html":{"href":"https://github.com/OrestHurskiy/CalenderApp/pull/11#discussion_r43234986"},"pull_request":{"href":"https://api.github.com/repos/OrestHurskiy/CalenderApp/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/pulls/11","id":48023592,"html_url":"https://github.com/OrestHurskiy/CalenderApp/pull/11","diff_url":"https://github.com/OrestHurskiy/CalenderApp/pull/11.diff","patch_url":"https://github.com/OrestHurskiy/CalenderApp/pull/11.patch","issue_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/issues/11","number":11,"state":"open","locked":false,"title":"Creating checking for events conflicts","user":{"login":"KarpaDmytro","id":14778235,"avatar_url":"https://avatars.githubusercontent.com/u/14778235?v=3","gravatar_id":"","url":"https://api.github.com/users/KarpaDmytro","html_url":"https://github.com/KarpaDmytro","followers_url":"https://api.github.com/users/KarpaDmytro/followers","following_url":"https://api.github.com/users/KarpaDmytro/following{/other_user}","gists_url":"https://api.github.com/users/KarpaDmytro/gists{/gist_id}","starred_url":"https://api.github.com/users/KarpaDmytro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KarpaDmytro/subscriptions","organizations_url":"https://api.github.com/users/KarpaDmytro/orgs","repos_url":"https://api.github.com/users/KarpaDmytro/repos","events_url":"https://api.github.com/users/KarpaDmytro/events{/privacy}","received_events_url":"https://api.github.com/users/KarpaDmytro/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-19T01:09:42Z","updated_at":"2015-10-28T09:53:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4933787720b12632933e63f4c37ff1085a8b27d1","assignee":{"login":"oloandriy","id":10503958,"avatar_url":"https://avatars.githubusercontent.com/u/10503958?v=3","gravatar_id":"","url":"https://api.github.com/users/oloandriy","html_url":"https://github.com/oloandriy","followers_url":"https://api.github.com/users/oloandriy/followers","following_url":"https://api.github.com/users/oloandriy/following{/other_user}","gists_url":"https://api.github.com/users/oloandriy/gists{/gist_id}","starred_url":"https://api.github.com/users/oloandriy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oloandriy/subscriptions","organizations_url":"https://api.github.com/users/oloandriy/orgs","repos_url":"https://api.github.com/users/oloandriy/repos","events_url":"https://api.github.com/users/oloandriy/events{/privacy}","received_events_url":"https://api.github.com/users/oloandriy/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/pulls/11/commits","review_comments_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/pulls/11/comments","review_comment_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/issues/11/comments","statuses_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/statuses/77566722a38a5dcee471bf35ddc63fc60df8178b","head":{"label":"OrestHurskiy:Including-Checking-Conflicts","ref":"Including-Checking-Conflicts","sha":"77566722a38a5dcee471bf35ddc63fc60df8178b","user":{"login":"OrestHurskiy","id":11854706,"avatar_url":"https://avatars.githubusercontent.com/u/11854706?v=3","gravatar_id":"","url":"https://api.github.com/users/OrestHurskiy","html_url":"https://github.com/OrestHurskiy","followers_url":"https://api.github.com/users/OrestHurskiy/followers","following_url":"https://api.github.com/users/OrestHurskiy/following{/other_user}","gists_url":"https://api.github.com/users/OrestHurskiy/gists{/gist_id}","starred_url":"https://api.github.com/users/OrestHurskiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OrestHurskiy/subscriptions","organizations_url":"https://api.github.com/users/OrestHurskiy/orgs","repos_url":"https://api.github.com/users/OrestHurskiy/repos","events_url":"https://api.github.com/users/OrestHurskiy/events{/privacy}","received_events_url":"https://api.github.com/users/OrestHurskiy/received_events","type":"User","site_admin":false},"repo":{"id":42934225,"name":"CalenderApp","full_name":"OrestHurskiy/CalenderApp","owner":{"login":"OrestHurskiy","id":11854706,"avatar_url":"https://avatars.githubusercontent.com/u/11854706?v=3","gravatar_id":"","url":"https://api.github.com/users/OrestHurskiy","html_url":"https://github.com/OrestHurskiy","followers_url":"https://api.github.com/users/OrestHurskiy/followers","following_url":"https://api.github.com/users/OrestHurskiy/following{/other_user}","gists_url":"https://api.github.com/users/OrestHurskiy/gists{/gist_id}","starred_url":"https://api.github.com/users/OrestHurskiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OrestHurskiy/subscriptions","organizations_url":"https://api.github.com/users/OrestHurskiy/orgs","repos_url":"https://api.github.com/users/OrestHurskiy/repos","events_url":"https://api.github.com/users/OrestHurskiy/events{/privacy}","received_events_url":"https://api.github.com/users/OrestHurskiy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/OrestHurskiy/CalenderApp","description":"Booking meeting rooms","fork":false,"url":"https://api.github.com/repos/OrestHurskiy/CalenderApp","forks_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/forks","keys_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/teams","hooks_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/hooks","issue_events_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/issues/events{/number}","events_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/events","assignees_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/assignees{/user}","branches_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/branches{/branch}","tags_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/tags","blobs_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/git/refs{/sha}","trees_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/statuses/{sha}","languages_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/languages","stargazers_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/stargazers","contributors_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/contributors","subscribers_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/subscribers","subscription_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/subscription","commits_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/commits{/sha}","git_commits_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/git/commits{/sha}","comments_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/comments{/number}","issue_comment_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/issues/comments{/number}","contents_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/contents/{+path}","compare_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/merges","archive_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/downloads","issues_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/issues{/number}","pulls_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/pulls{/number}","milestones_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/milestones{/number}","notifications_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/labels{/name}","releases_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/releases{/id}","created_at":"2015-09-22T13:06:53Z","updated_at":"2015-09-25T07:43:48Z","pushed_at":"2015-10-28T01:36:11Z","git_url":"git://github.com/OrestHurskiy/CalenderApp.git","ssh_url":"git@github.com:OrestHurskiy/CalenderApp.git","clone_url":"https://github.com/OrestHurskiy/CalenderApp.git","svn_url":"https://github.com/OrestHurskiy/CalenderApp","homepage":null,"size":13016,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"OrestHurskiy:dev","ref":"dev","sha":"6f2b5b970cd05592abf3f8e7578fa91e4e53ee4a","user":{"login":"OrestHurskiy","id":11854706,"avatar_url":"https://avatars.githubusercontent.com/u/11854706?v=3","gravatar_id":"","url":"https://api.github.com/users/OrestHurskiy","html_url":"https://github.com/OrestHurskiy","followers_url":"https://api.github.com/users/OrestHurskiy/followers","following_url":"https://api.github.com/users/OrestHurskiy/following{/other_user}","gists_url":"https://api.github.com/users/OrestHurskiy/gists{/gist_id}","starred_url":"https://api.github.com/users/OrestHurskiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OrestHurskiy/subscriptions","organizations_url":"https://api.github.com/users/OrestHurskiy/orgs","repos_url":"https://api.github.com/users/OrestHurskiy/repos","events_url":"https://api.github.com/users/OrestHurskiy/events{/privacy}","received_events_url":"https://api.github.com/users/OrestHurskiy/received_events","type":"User","site_admin":false},"repo":{"id":42934225,"name":"CalenderApp","full_name":"OrestHurskiy/CalenderApp","owner":{"login":"OrestHurskiy","id":11854706,"avatar_url":"https://avatars.githubusercontent.com/u/11854706?v=3","gravatar_id":"","url":"https://api.github.com/users/OrestHurskiy","html_url":"https://github.com/OrestHurskiy","followers_url":"https://api.github.com/users/OrestHurskiy/followers","following_url":"https://api.github.com/users/OrestHurskiy/following{/other_user}","gists_url":"https://api.github.com/users/OrestHurskiy/gists{/gist_id}","starred_url":"https://api.github.com/users/OrestHurskiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OrestHurskiy/subscriptions","organizations_url":"https://api.github.com/users/OrestHurskiy/orgs","repos_url":"https://api.github.com/users/OrestHurskiy/repos","events_url":"https://api.github.com/users/OrestHurskiy/events{/privacy}","received_events_url":"https://api.github.com/users/OrestHurskiy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/OrestHurskiy/CalenderApp","description":"Booking meeting rooms","fork":false,"url":"https://api.github.com/repos/OrestHurskiy/CalenderApp","forks_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/forks","keys_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/teams","hooks_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/hooks","issue_events_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/issues/events{/number}","events_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/events","assignees_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/assignees{/user}","branches_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/branches{/branch}","tags_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/tags","blobs_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/git/refs{/sha}","trees_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/statuses/{sha}","languages_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/languages","stargazers_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/stargazers","contributors_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/contributors","subscribers_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/subscribers","subscription_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/subscription","commits_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/commits{/sha}","git_commits_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/git/commits{/sha}","comments_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/comments{/number}","issue_comment_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/issues/comments{/number}","contents_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/contents/{+path}","compare_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/merges","archive_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/downloads","issues_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/issues{/number}","pulls_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/pulls{/number}","milestones_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/milestones{/number}","notifications_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/labels{/name}","releases_url":"https://api.github.com/repos/OrestHurskiy/CalenderApp/releases{/id}","created_at":"2015-09-22T13:06:53Z","updated_at":"2015-09-25T07:43:48Z","pushed_at":"2015-10-28T01:36:11Z","git_url":"git://github.com/OrestHurskiy/CalenderApp.git","ssh_url":"git@github.com:OrestHurskiy/CalenderApp.git","clone_url":"https://github.com/OrestHurskiy/CalenderApp.git","svn_url":"https://github.com/OrestHurskiy/CalenderApp","homepage":null,"size":13016,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OrestHurskiy/CalenderApp/pulls/11"},"html":{"href":"https://github.com/OrestHurskiy/CalenderApp/pull/11"},"issue":{"href":"https://api.github.com/repos/OrestHurskiy/CalenderApp/issues/11"},"comments":{"href":"https://api.github.com/repos/OrestHurskiy/CalenderApp/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/OrestHurskiy/CalenderApp/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/OrestHurskiy/CalenderApp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OrestHurskiy/CalenderApp/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/OrestHurskiy/CalenderApp/statuses/77566722a38a5dcee471bf35ddc63fc60df8178b"}}}}