show error page if backend isnt running

This commit is contained in:
Jake Potrebic 2021-03-15 11:41:46 -07:00
parent 8417acefb9
commit 8a16baf5f2
No known key found for this signature in database
GPG Key ID: 7C58557EC9C421F8

View File

@ -90,8 +90,10 @@ export default class Home extends Vue {
}
async asyncData({ $api, $util }: Context) {
const sponsor = await $api.requestInternal<ProjectPage>(`data/sponsor`, false).catch<any>($util.handlePageRequestError);
const projects = await $api.request<PaginatedResult<Project>>('projects', false, 'get', { limit: 25, offset: 0 });
const sponsor = await $api.requestInternal<ProjectPage>(`data/sponsor`, false).catch<any>($util.handleRequestError);
const projects = await $api
.request<PaginatedResult<Project>>('projects', false, 'get', { limit: 25, offset: 0 })
.catch<any>($util.handlePageRequestError);
return { projects, sponsor };
}
}