Fix validation of hostPath

When adding a volume, this comes in mountOptions. The hostPath in the
database is the computed host path.
This commit is contained in:
Girish Ramakrishnan
2023-02-25 23:14:54 +01:00
parent 5f6ae93106
commit 03a77ddf01
7 changed files with 32 additions and 33 deletions

View File

@@ -3320,13 +3320,12 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
});
};
Client.prototype.addVolume = function (name, mountType, hostPath, mountOptions, callback) {
Client.prototype.addVolume = function (name, mountType, mountOptions, callback) {
var data = {
name: name,
mountType: mountType,
mountOptions: mountOptions
};
if (hostPath) data.hostPath = hostPath;
post('/api/v1/volumes', data, null, function (error, data, status) {
if (error) return callback(error);