👽 added async to api calls
Co-authored-by: Sindre Kjelsrud <kjelsrudsindre@gmail.com>
This commit is contained in:
parent
14c24ae97e
commit
f417e575ea
8 changed files with 17 additions and 11 deletions
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
let evaluationText:string = ""
|
||||
|
||||
const handleEvaluationSubmit = () => {
|
||||
const handleEvaluationSubmit = async () => {
|
||||
if (evaluationText) {
|
||||
postEvaluationData(evaluationText)
|
||||
await postEvaluationData(evaluationText)
|
||||
goto("/")
|
||||
} else {
|
||||
console.log("error");
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
let bugText:string = ""
|
||||
|
||||
const handleBugSubmit = () => {
|
||||
const handleBugSubmit = async () => {
|
||||
if (bugText) {
|
||||
postBugData(bugText)
|
||||
await postBugData(bugText)
|
||||
goto("javascript:history.back()")
|
||||
} else {
|
||||
console.log("error");
|
||||
|
|
|
|||
Reference in a new issue