Rename also function name transformer for Axios
This commit is contained in:
parent
915ed652e1
commit
2c0fe980eb
2 changed files with 4 additions and 4 deletions
|
@ -17,11 +17,11 @@
|
|||
<script type="text/javascript">
|
||||
window.addEventListener('load', function() {
|
||||
// we get the current value stored by the server when the page is loaded
|
||||
getcounter().then(updateCounter).catch(alert);
|
||||
getCounter().then(updateCounter).catch(alert);
|
||||
|
||||
// we update the value every 1sec, in the same way
|
||||
window.setInterval(function() {
|
||||
getcounter().then(updateCounter).catch(alert);
|
||||
getCounter().then(updateCounter).catch(alert);
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
|
@ -33,7 +33,7 @@ function updateCounter(response)
|
|||
// when the button is clicked, ask the server to increase
|
||||
// the value by one
|
||||
document.getElementById('inc').addEventListener('click', function() {
|
||||
postcounter().then(updateCounter).catch(alert);
|
||||
postCounter().then(updateCounter).catch(alert);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -112,7 +112,7 @@ generateAxiosJSWith aopts opts req = "\n" <>
|
|||
where
|
||||
hasNoModule = null (moduleName opts)
|
||||
|
||||
fname = namespace <> (functionRenamer opts $ req ^. funcName)
|
||||
fname = namespace <> (functionNameBuilder opts $ req ^. funcName)
|
||||
|
||||
method = map toLower $ req ^. reqMethod
|
||||
url = if url' == "'" then "'/'" else url'
|
||||
|
|
Loading…
Reference in a new issue