create old api method for ir daemon to start race from (This should be removed and moved to dedicated daemon/service.
This commit is contained in:
parent
45bb793cc9
commit
aebf90259b
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user