1
0
mirror of https://github.com/NginxProxyManager/nginx-proxy-manager.git synced 2025-08-29 14:01:58 +03:00
This commit is contained in:
Jamie Curnow
2018-07-18 08:35:49 +10:00
parent c5450eaa1a
commit c629deb56c
34 changed files with 710 additions and 295 deletions

View File

@@ -264,6 +264,25 @@ module.exports = {
*/
create: function (data) {
return fetch('post', 'nginx/proxy-hosts', data);
},
/**
* @param {Object} data
* @param {Integer} data.id
* @returns {Promise}
*/
update: function (data) {
let id = data.id;
delete data.id;
return fetch('put', 'nginx/proxy-hosts/' + id, data);
},
/**
* @param {Integer} id
* @returns {Promise}
*/
delete: function (id) {
return fetch('delete', 'nginx/proxy-hosts/' + id);
}
},