diff --git a/RaceLapTimer/RaceLapTimer/ApiControllers/OldRaceSessionApiModule.cs b/RaceLapTimer/RaceLapTimer/ApiControllers/OldRaceSessionApiModule.cs new file mode 100644 index 0000000..65f8b22 --- /dev/null +++ b/RaceLapTimer/RaceLapTimer/ApiControllers/OldRaceSessionApiModule.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Web.Http.Results; +using Interfaces; +using Nancy; + +namespace RaceLapTimer.ApiControllers +{ + class OldRaceSessionApiModule : NancyModule + { + private INotifierManager _manager; + + public OldRaceSessionApiModule(INotifierManager notifierManager) + :base("/api/v1/race_session") + { + _manager = notifierManager; + Post["new"] = args => CreateNewRace(); + } + + private dynamic CreateNewRace() + { + //TODO: what goes here? + _manager.NotifyRaceStarted(new NotificationEventArgs()); + return HttpStatusCode.OK; + } + } +}