review app
This commit is contained in:
parent
4a35a3211f
commit
f525a76f6e
38 changed files with 268 additions and 229 deletions
|
@ -0,0 +1,19 @@
|
|||
import { Result } from "../../../core/helper/result";
|
||||
import { ActivePipeline } from "../../../core/model/active_pipeline_model";
|
||||
import { pipelineRealTimeService } from "../realtime_presentation";
|
||||
|
||||
export class PipelineStatusUseCase {
|
||||
async call(): Promise<Result<Error, ActivePipeline>> {
|
||||
try {
|
||||
const status = pipelineRealTimeService.status;
|
||||
if (status.projectUUID !== null) {
|
||||
return Result.ok(status);
|
||||
}
|
||||
if (status.projectUUID === null) {
|
||||
return Result.error(new Error("pipelineRealTimeService does not have an active project instance"));
|
||||
}
|
||||
} catch (error) {
|
||||
return Result.error(error as Error);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue