Simplify project route loading

Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
This commit is contained in:
Thomas Scholtes
2023-07-24 12:15:35 +02:00
committed by Rūdolfs Ošiņš
parent f631c7f171
commit dd7f3a850e
+2 -7
View File
@@ -217,14 +217,9 @@ export async function loadProjectRoute(
};
} else if (route.resource === "project.issue") {
try {
const projectPromise = api.project.getById(route.project);
const issuePromise = api.project.getIssueById(
route.project,
route.issue,
);
const [project, issue] = await Promise.all([
projectPromise,
issuePromise,
api.project.getById(route.project),
api.project.getIssueById(route.project, route.issue),
]);
return {
resource: "projects",