コード例 #1
0
ファイル: SSDController.cs プロジェクト: Fargose/FerumChecker
        public ActionResult SetHardware(int id, int assemblyId)
        {
            var computerAssembly = _assemblyService.GetComputerAssembly(assemblyId);

            if (computerAssembly == null)
            {
                return(NotFound());
            }
            var userId = _userService.GetApplicationUserManager().GetUserId(this.User);

            if (computerAssembly.OwnerId != userId)
            {
                return(Forbid());
            }
            var result = _assemblyService.SetSSD(id, assemblyId);

            return(Json(result));
        }