mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-23 20:54:50 +03:00
Use our svelte based explosion handling
This commit is contained in:
parent
e53c11a477
commit
445bd6a66f
@ -5,29 +5,21 @@ import { plainToInstance } from 'class-transformer';
|
||||
export class BranchListingService {
|
||||
constructor(private projectId: string) {}
|
||||
async list(filter: BranchListingFilter | undefined = undefined) {
|
||||
try {
|
||||
const branches = plainToInstance(
|
||||
BranchListing,
|
||||
await invoke<any[]>('list_branches', { projectId: this.projectId, filter })
|
||||
);
|
||||
return branches;
|
||||
} catch (err: any) {
|
||||
console.error(err);
|
||||
}
|
||||
const branches = plainToInstance(
|
||||
BranchListing,
|
||||
await invoke<any[]>('list_branches', { projectId: this.projectId, filter })
|
||||
);
|
||||
return branches;
|
||||
}
|
||||
async get_branch_listing_details(branchNames: string[]) {
|
||||
try {
|
||||
const branches = plainToInstance(
|
||||
BranchListingDetails,
|
||||
await invoke<any[]>('get_branch_listing_details', {
|
||||
projectId: this.projectId,
|
||||
branchNames
|
||||
})
|
||||
);
|
||||
return branches;
|
||||
} catch (err: any) {
|
||||
console.error(err);
|
||||
}
|
||||
const branches = plainToInstance(
|
||||
BranchListingDetails,
|
||||
await invoke<any[]>('get_branch_listing_details', {
|
||||
projectId: this.projectId,
|
||||
branchNames
|
||||
})
|
||||
);
|
||||
return branches;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user