public void CompleteJob(UserJobAction uja) { //test here if userId is logged in or return _db.CompleteJob(uja.JobId, uja.UserId); Clients.All.SendAsync("JobCompleted", uja.JobId); }
public void TakeJob(UserJobAction uja) { Job job = _db.AssignJob(uja.JobId, uja.UserId); Clients.Others.SendAsync("JobTaken", job).Wait(); Clients.Caller.SendAsync("MyJob", job); }