Changeset 0.29.0 (#195)
This commit is contained in:
@@ -337,7 +337,7 @@ const API = {
|
||||
listWorkspaces() { return this._get('/api/v1/workspaces'); },
|
||||
createWorkspace(data) { return this._post('/api/v1/workspaces', data); },
|
||||
updateWorkspace(id, patch) { return this._patch(`/api/v1/workspaces/${id}`, patch); },
|
||||
deleteWorkspace(id) { return this._delete(`/api/v1/workspaces/${id}`); },
|
||||
deleteWorkspace(id) { return this._del(`/api/v1/workspaces/${id}`); },
|
||||
listGitCredentials() { return this._get('/api/v1/git-credentials'); },
|
||||
|
||||
// ── Messages ─────────────────────────────
|
||||
@@ -945,6 +945,7 @@ const API = {
|
||||
async _post(path, body, skipAuth) { return skipAuth ? this._raw(path, 'POST', body) : this._authed(path, 'POST', body); },
|
||||
async _put(path, body) { return this._authed(path, 'PUT', body); },
|
||||
async _del(path) { return this._authed(path, 'DELETE'); },
|
||||
async _delete(path) { return this._del(path); }, // alias — `delete` is a JS reserved word
|
||||
async _patch(path, body) { return this._authed(path, 'PATCH', body); },
|
||||
|
||||
async _authed(path, method = 'GET', body) {
|
||||
@@ -991,4 +992,4 @@ const API = {
|
||||
}
|
||||
};
|
||||
|
||||
sb.ns('API', API);
|
||||
sb.ns('API', API);
|
||||
@@ -101,7 +101,7 @@ const Switchboard = {
|
||||
* @param {object} [opts] — { signal }
|
||||
*/
|
||||
async del(path, opts) {
|
||||
return API._delete(path, opts?.signal);
|
||||
return API._del(path, opts?.signal);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user