public IActionResult CreateArt(int userId, string artTitle) { int artId = mainService.CreateArt(userId, artTitle); return(ActionResults.Json(new { artId = artId })); }
public IActionResult PushMessage(int userId, [FromBody] Message message) { mainService.PushMessage(message); return(ActionResults.Json(new { message = "Pushed Message." })); }
public IActionResult DisconnectDevice(int userId) { mainService.DisconnectDevice(userId); return(ActionResults.Json(new { message = "Device Disconnected." })); }
public IActionResult ConnectWithoutHololens() { int userId = mainService.ConnectWithoutHoloLens(); return(ActionResults.Json(new { userId = userId })); }
public IActionResult SaveSettings([FromBody] SettingsChangedMessage message) { mainService.PushMessage(message); return(ActionResults.Json(new { message = "Pushed Message." })); }
public IActionResult SaveTextMessage([FromBody] SaveTextMessage message) { mainService.PushMessage(message); return(ActionResults.Json(new { message = "Pushed Message." })); }
public IActionResult GetMessages(int userId) { if (!mainService.CheckUserExists(userId)) { return(ActionResults.Json(new { error = "No such user!" }, 400)); } return(ActionResults.Json(new { messages = JsonConvert.SerializeObject(mainService.GetMessages(userId)) })); }
public IActionResult ConnectWithHololens(string pin) { int userId = mainService.ConnectWithHoloLens(pin); if (userId != 0) { return(ActionResults.Json(new { userId = userId }, 200)); } else { return(ActionResults.Json(new { error = "Pin does not match with any device" }, 400)); } }
public IActionResult GetMediaItems(int userId) { return(ActionResults.Json(mainService.GetMediaItems(userId, true))); }
[HttpGet("dump")] // calismiyor public IActionResult Dump() { return(ActionResults.Json(mainService.Dump())); }
[HttpGet("gallery")] // calismiyor public IActionResult Gallery(int userId) { return(ActionResults.Json(mainService.GetGallery(userId))); }
[HttpGet("search")] // ??? public IActionResult Search(string json) { return(ActionResults.Json(mainService.getSearchResult(json))); }
[HttpPost("getDetails")] //db gelince test et public IActionResult GetDetails(int artId) { var result = mainService.getDetails(artId); return(ActionResults.Json(result)); }
[HttpGet("pin")] // -- public IActionResult GeneratePin() { return(ActionResults.Json(new { pin = mainService.GeneratePin() })); }
public IActionResult CheckForPairing(string pin) { return(ActionResults.Json(new { userId = mainService.CheckForPairing(pin) })); }