make checkout version and revert version fit pattern (#118)
This commit is contained in:
@@ -458,17 +458,11 @@ export class IpcClient {
|
||||
}: {
|
||||
appId: number;
|
||||
previousVersionId: string;
|
||||
}): Promise<{ success: boolean }> {
|
||||
try {
|
||||
const result = await this.ipcRenderer.invoke("revert-version", {
|
||||
appId,
|
||||
previousVersionId,
|
||||
});
|
||||
return result;
|
||||
} catch (error) {
|
||||
showError(error);
|
||||
throw error;
|
||||
}
|
||||
}): Promise<void> {
|
||||
await this.ipcRenderer.invoke("revert-version", {
|
||||
appId,
|
||||
previousVersionId,
|
||||
});
|
||||
}
|
||||
|
||||
// Checkout a specific version without creating a revert commit
|
||||
@@ -478,17 +472,11 @@ export class IpcClient {
|
||||
}: {
|
||||
appId: number;
|
||||
versionId: string;
|
||||
}): Promise<{ success: boolean }> {
|
||||
try {
|
||||
const result = await this.ipcRenderer.invoke("checkout-version", {
|
||||
appId,
|
||||
versionId,
|
||||
});
|
||||
return result;
|
||||
} catch (error) {
|
||||
showError(error);
|
||||
throw error;
|
||||
}
|
||||
}): Promise<void> {
|
||||
await this.ipcRenderer.invoke("checkout-version", {
|
||||
appId,
|
||||
versionId,
|
||||
});
|
||||
}
|
||||
|
||||
// Get the current branch of an app
|
||||
|
||||
Reference in New Issue
Block a user