mirror of
https://github.com/open-webui/computer.git
synced 2026-11-29 16:35:22 -05:00
refac
This commit is contained in:
1 parent
08d2afffc5
commit
6fdcbcfaa5
5 files changed
+246
-36
No files matched your search
@@ -84,6 +84,20 @@ export const gitUnstash = (root: string, index = 0) =>
|
||||
export const createGitBranch = (root: string, name: string) =>
|
||||
fetchJSON('/api/git/branch', jsonBody({ root, name }));
|
||||
|
||||
export const renameGitBranch = (root: string, old_name: string, new_name: string) =>
|
||||
fetchJSON('/api/git/branch', {
|
||||
method: 'PATCH',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ root, old_name, new_name })
|
||||
});
|
||||
|
||||
export const deleteGitBranch = (root: string, name: string) =>
|
||||
fetchJSON('/api/git/branch', {
|
||||
method: 'DELETE',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ root, name })
|
||||
});
|
||||
|
||||
export const checkoutBranch = (root: string, branch: string) =>
|
||||
fetchJSON('/api/git/checkout', jsonBody({ root, branch }));
|
||||
|
||||
|
||||
Reference in new issue
Block a user