mqp review: Use console.error if !response.ok

This commit is contained in:
James Grugett 2022-10-07 16:59:16 -05:00
parent 89936ed8b1
commit 48d77d208e

View File

@ -35,9 +35,12 @@ export const updateMetrics = functions.pubsub
},
method: 'POST',
body: JSON.stringify({}),
}).then((res) => res.json())
})
console.log(await response)
const json = await response.json()
if (response.ok) console.log(json)
else console.error(json)
})
export const updatemetrics = newEndpointNoAuth(