diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 18dfe76b12..9ffa834d3f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,6 @@ # "examples/generics", # "examples/ledger_canister", # "examples/manual_reply", -# "examples/motoko_examples/quicksort", # "examples/motoko_examples/simple-to-do", # "examples/motoko_examples/superheroes", # "examples/motoko_examples/threshold_ecdsa", @@ -113,6 +112,7 @@ jobs: "examples/motoko_examples/minimal-counter-dapp", "examples/motoko_examples/persistent-storage", "examples/motoko_examples/phone-book", + "examples/motoko_examples/quicksort", "examples/primitive_types", "examples/principal", "examples/query", diff --git a/examples/motoko_examples/quicksort/dfx.json b/examples/motoko_examples/quicksort/dfx.json index 36fa28e0e0..e1090908d4 100644 --- a/examples/motoko_examples/quicksort/dfx.json +++ b/examples/motoko_examples/quicksort/dfx.json @@ -6,7 +6,8 @@ "root": "src", "ts": "src/index.ts", "candid": "src/index.did", - "wasm": ".azle/quicksort/quicksort.wasm.gz", + "wasm": ".azle/quicksort/quicksort.wasm", + "gzip": true, "declarations": { "output": "test/dfx_generated/quicksort", "node_compatibility": true diff --git a/examples/motoko_examples/quicksort/src/index.ts b/examples/motoko_examples/quicksort/src/index.ts index a85bdc1257..2da8e6b157 100644 --- a/examples/motoko_examples/quicksort/src/index.ts +++ b/examples/motoko_examples/quicksort/src/index.ts @@ -2,9 +2,8 @@ import { int, Vec, query, Service } from 'azle'; import { Int } from './comparison'; import * as Quicksort from './quicksort'; -export default class extends Service { - @query([Vec(int)], Vec(int)) - sort(xs: Vec): Vec { +export default Service({ + sort: query([Vec(int)], Vec(int), (xs: Vec) => { return Quicksort.sortBy(xs, Int.compare); - } -} + }) +});