Exemple #1
0
        public async Task <IActionResult> GetById(Guid id)
        {
            var model = await _service.Read(id).ConfigureAwait(false);

            if (model == null)
            {
                return(NotFound());
            }

            return(Ok(model));
        }
Exemple #2
0
        public async Task <IActionResult> WakeUpHost(Guid id)
        {
            var host = await _hostService.Read(id).ConfigureAwait(false);

            if (host == null)
            {
                return(NotFound());
            }

            await _wolService.SendMagicPacket(host).ConfigureAwait(false);

            return(Ok());
        }