hugo-sandstorm/.cloudcmd.menu.js

13 lines
305 B
JavaScript
Raw Normal View History

module.exports = {
'G - Commit all changes and re-run Hugo': async({ CloudCmd }) => {
const response = await fetch('/commit')
const responseJSON = await response.json()
if (responseJSON.ok) {
window.location.href = '/'
} else {
console.error(responseJSON.error)
}
}
}