Skip to content

Commit

Permalink
Changing arguments in GoogleCalendar controllers fromBody to from query
Browse files Browse the repository at this point in the history
  • Loading branch information
Edrisym committed Nov 6, 2024
1 parent 84cf098 commit 4d9b080
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Controllers/GoogleCalendarController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public GoogleCalendarController(IGoogleCalendarService service)
}

[HttpPost("/")]
public async Task<string> CreateEvent([FromBody] EventModel model)
public async Task<string> CreateEvent([FromQuery] EventModel model)
{
var createdEvent = await _service.CreateEventAsync(model);
return string.Format(MessagePattern, createdEvent.Id);
Expand All @@ -26,7 +26,7 @@ public async Task<bool> Revoke()
}

[HttpPut("/{eventId}")]
public async Task<Event?> UpdateEvent(string eventId, [FromBody] EventModel eventModel)
public async Task<Event?> UpdateEvent(string eventId, [FromQuery] EventModel eventModel)
{
return await _service.UpdateEventAsync(eventId, eventModel);
}
Expand Down

0 comments on commit 4d9b080

Please sign in to comment.