Skip to content

Commit

Permalink
async await
Browse files Browse the repository at this point in the history
  • Loading branch information
kimprice committed Jan 5, 2024
1 parent 4f16ac1 commit 7c88a02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions teachertool/src/components/DebugInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useState } from "react";
import { Button } from "react-common/components/controls/Button";
import { Input } from "react-common/components/controls/Input";
import { Textarea } from "react-common/components/controls/Textarea";
import { runEvaluate } from "../transforms/runEvaluate";
import { runEvaluateAsync } from "../transforms/runEvaluate";

interface IProps {}

Expand All @@ -13,7 +13,7 @@ const DebugInput: React.FC<IProps> = ({}) => {
const [rubric, setRubric] = useState("");

const evaluate = async () => {
runEvaluate(shareLink, rubric);
await runEvaluateAsync(shareLink, rubric);
}

return (
Expand Down
2 changes: 1 addition & 1 deletion teachertool/src/transforms/runEvaluate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getProjectMetaAsync, getProjectTextAsync } from "../services/BackendRequests";

export async function runEvaluate(shareLink: string, rubric: string) {
export async function runEvaluateAsync(shareLink: string, rubric: string) {
console.log(`Evaluate ${shareLink} with ${rubric}!`);
const scriptId = pxt.Cloud.parseScriptId(shareLink);
if (!scriptId) {
Expand Down

0 comments on commit 7c88a02

Please sign in to comment.