Code · 20 lines · 470 bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20using Microsoft.AspNetCore.Mvc;

namespace VanDerHeijden.JsonBodyProviderTest.Controllers;

[Route("api")]
public class EventsController : ControllerBase
{
	[HttpPost("events")]
	public IActionResult TrackEvent(
		string EventName,
		string UserId,
		DateTime Timestamp,
		int Value,
		Dictionary<string, string> Properties,
		bool IsConversion,
		Guid? CampaignId)
	{
		return Ok(new { EventName, UserId, Timestamp, Value, Properties, IsConversion, CampaignId });
	}
}