Remove unnecessary try/catch

This commit is contained in:
James M. Greene
2022-09-16 21:50:49 -05:00
parent 25a1ec8799
commit 1cefe6fc7c

View File

@@ -33,21 +33,17 @@ async function enablePagesSite({ repositoryNwo, githubToken }) {
} }
async function getPagesSite({ repositoryNwo, githubToken }) { async function getPagesSite({ repositoryNwo, githubToken }) {
try { const pagesEndpoint = `${getApiBaseUrl()}/repos/${repositoryNwo}/pages`
const pagesEndpoint = `${getApiBaseUrl()}/repos/${repositoryNwo}/pages`
const response = await axios.get(pagesEndpoint, { const response = await axios.get(pagesEndpoint, {
headers: { headers: {
Accept: 'application/vnd.github.v3+json', Accept: 'application/vnd.github.v3+json',
Authorization: `Bearer ${githubToken}` Authorization: `Bearer ${githubToken}`
} }
}) })
const pageObject = response.data const pageObject = response.data
return pageObject return pageObject
} catch (error) {
throw error
}
} }
async function findOrCreatePagesSite({ repositoryNwo, githubToken, enablement = true }) { async function findOrCreatePagesSite({ repositoryNwo, githubToken, enablement = true }) {