diff --git a/web/app/components/doc/tile.hbs b/web/app/components/doc/tile.hbs index 07aeda44f..5285ee558 100644 --- a/web/app/components/doc/tile.hbs +++ b/web/app/components/doc/tile.hbs @@ -1,4 +1,4 @@ -
+
{ let endpoint = isDraft ? "drafts" : "documents"; - let fetchResponse = await this.fetchSvc.fetch( - `/api/v1/${endpoint}/${id}` - ); - return { - doc: await fetchResponse?.json(), - isDraft, - }; + let doc = await this.fetchSvc + .fetch(`/api/v1/${endpoint}/${id}`) + .then((resp) => resp?.json()); + + doc.isDraft = isDraft; + + return { doc, isDraft }; }) ); /** diff --git a/web/app/templates/authenticated/dashboard.hbs b/web/app/templates/authenticated/dashboard.hbs index 60c71cf87..d2649357c 100644 --- a/web/app/templates/authenticated/dashboard.hbs +++ b/web/app/templates/authenticated/dashboard.hbs @@ -29,6 +29,7 @@
{{#each this.recentDocs.all as |r|}}