remove whitespace in const and set true endpoint in widget

This commit is contained in:
Nitzan Miranda 2023-07-23 19:31:41 +03:00 committed by shamoon
parent da3597a04d
commit 0ea5d47fff
2 changed files with 3 additions and 4 deletions

View File

@ -6,13 +6,12 @@ import useWidgetAPI from "utils/proxy/use-widget-api";
export default function Component({ service }) { export default function Component({ service }) {
const { t } = useTranslation(); const { t } = useTranslation();
const { widget } = service; const { widget } = service;
const { azureType } = widget; const { azureType } = widget;
const { userEmail } = widget; const { userEmail } = widget;
const { data: pipelineData, error: pipelineError } = useWidgetAPI(widget, "pipeline"); const { data: pipelineData, error: pipelineError } = useWidgetAPI(widget, "pipeline");
const { data: prData, error: prError } = useWidgetAPI(widget, "pr"); const { data: prData, error: prError } = useWidgetAPI(widget, "pr");
if (azureType === "Pipeline") { if (azureType === "Pipeline") {
if (pipelineError) { if (pipelineError) {
return <Container service={service} error={pipelineError} />; return <Container service={service} error={pipelineError} />;

View File

@ -6,11 +6,11 @@ const widget = {
mappings: { mappings: {
pr: { pr: {
endpoint: "git/repositories/BackEnd/pullrequests", endpoint: "git/repositories/{repositoryId}/pullrequests"
}, },
pipeline: { pipeline: {
endpoint: "build/Builds?branchName=&definitions=141" endpoint: "build/Builds?branchName={branchName}&definitions={definitionId}"
}, },
}, },
}; };