try {
const url = `${window.gitlist.basepath}/${window.gitlist.repo}/git-helper/${window.gitlist.branch}/save`
const response = await $.ajax({
url: url,
type: 'POST',
data: {
value: value,
email: inputs.email.val(),
name: inputs.name.val(),
comment: inputs.comment.val(),
filename: filename
}
})
const json = JSON.parse(response)
if (json.output !== '') {
$.snackbar({
htmlAllowed: true,
content: json.output,
})
}
if (json.error === true) {
errorHandler(json);
} else {