Use our svelte based explosion handling

This commit is contained in:
Caleb Owens 2024-07-30 16:44:27 +02:00
parent e53c11a477
commit 445bd6a66f

View File

@ -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;
}
}