5
0
mirror of git://git.proxmox.com/git/pve-docs.git synced 2025-02-01 05:47:08 +03:00
pve-docs/api-viewer/PVEAPI.js
Thomas Lamprecht 1f79cc8cea api-viewer: adapt to changes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-02 16:19:34 +02:00

11 lines
253 B
JavaScript

let method2cmd = {
GET: 'get',
POST: 'create',
PUT: 'set',
DELETE: 'delete'
};
function cliUsageRenderer(method, path) {
return `<tr><td>&nbsp;</td></td><tr><td>CLI:</td><td>pvesh ${method2cmd[method]} ${path}</td></tr></table>`;
}