public async Task<ActionResult<HardwareVaultProfile>> DeleteProfile(string id)
        {
            var profile = await _hardwareVaultService.GetProfileByIdAsync(id);
            if (profile == null)
            {
                return NotFound();
            }

            try
            {
                await _hardwareVaultService.DeleteProfileAsync(id);
            }
            catch (Exception ex)
            {
                _logger.LogError(ex.Message);
                return StatusCode(500, new { error = ex.Message });
            }

            return profile;
        }