mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Add resolutions by GPU validation.
This commit is contained in:
@@ -169,5 +169,14 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
{
|
||||
return _context.ResolutionsByGpu.Any(e => e.Id == id);
|
||||
}
|
||||
|
||||
[AcceptVerbs("Get", "Post")]
|
||||
public async Task<IActionResult> VerifyUnique(int gpuId, int resolutionId)
|
||||
{
|
||||
return await _context.ResolutionsByGpu.FirstOrDefaultAsync(i => i.GpuId == gpuId &&
|
||||
i.ResolutionId == resolutionId) is null
|
||||
? Json(true)
|
||||
: Json("The selected GPU already has the selected resolution.");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user