Fixed Volume Name and Path Check Path

This commit is contained in:
Kasra Bigdeli
2019-01-21 19:55:36 -08:00
parent 958938ea89
commit b841f02925

View File

@@ -130,11 +130,13 @@ class AppsDataStore {
)
}
if (obj.hostPath && !isValidPath(obj.hostPath)) {
throw ApiStatusCodes.createError(
ApiStatusCodes.STATUS_ERROR_GENERIC,
'Invalid volume host path: ' + obj.hostPath
)
if (obj.hostPath) {
if (!isValidPath(obj.hostPath)) {
throw ApiStatusCodes.createError(
ApiStatusCodes.STATUS_ERROR_GENERIC,
'Invalid volume host path: ' + obj.hostPath
)
}
} else {
if (
!obj.volumeName ||