From 4d9b080f20bedfa2b6a255384c75a1eb0334860c Mon Sep 17 00:00:00 2001 From: Eddie Date: Wed, 6 Nov 2024 18:21:35 +0330 Subject: [PATCH] Changing arguments in GoogleCalendar controllers fromBody to from query --- Controllers/GoogleCalendarController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Controllers/GoogleCalendarController.cs b/Controllers/GoogleCalendarController.cs index 2cbf092..c576ca5 100644 --- a/Controllers/GoogleCalendarController.cs +++ b/Controllers/GoogleCalendarController.cs @@ -13,7 +13,7 @@ public GoogleCalendarController(IGoogleCalendarService service) } [HttpPost("/")] - public async Task CreateEvent([FromBody] EventModel model) + public async Task CreateEvent([FromQuery] EventModel model) { var createdEvent = await _service.CreateEventAsync(model); return string.Format(MessagePattern, createdEvent.Id); @@ -26,7 +26,7 @@ public async Task Revoke() } [HttpPut("/{eventId}")] - public async Task UpdateEvent(string eventId, [FromBody] EventModel eventModel) + public async Task UpdateEvent(string eventId, [FromQuery] EventModel eventModel) { return await _service.UpdateEventAsync(eventId, eventModel); }