argh! can't use switch expressions in v8

This commit is contained in:
Shannon
2020-04-08 10:54:48 +10:00
parent 49c6fd2c76
commit d54eed5cb9

View File

@@ -110,12 +110,15 @@ namespace Umbraco.Web.HealthCheck.Checks.Data
public override HealthCheckStatus ExecuteAction(HealthCheckAction action)
{
return action.Alias switch
switch (action.Alias)
{
_fixContentPaths => CheckDocuments(true),
_fixMediaPaths => CheckMedia(true),
_ => throw new InvalidOperationException("Action not supported")
};
case _fixContentPaths:
return CheckDocuments(true);
case _fixMediaPaths:
return CheckMedia(true);
default:
throw new InvalidOperationException("Action not supported");
}
}
}
}