From 2401217a4019938d1c1cc61b6e33ccb233eb6e74 Mon Sep 17 00:00:00 2001 From: polwex Date: Tue, 3 Jun 2025 09:34:29 +0700 Subject: this is golden thanks claude --- src/actions/tones.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/actions/tones.ts') diff --git a/src/actions/tones.ts b/src/actions/tones.ts index 7d85d1c..0f28612 100644 --- a/src/actions/tones.ts +++ b/src/actions/tones.ts @@ -1,6 +1,6 @@ "use server"; -import db from "@/lib/db"; +import pdb from "@/lib/db/prosodydb"; import { WordData } from "@/zoom/logic/types"; // Helper to extract tone from prosody - assuming prosody is an array of objects like [{tone: number}, ...] @@ -10,8 +10,14 @@ const getTonesFromProsody = (prosody: any): number[] | null => { } return null; }; - export async function fetchWordsByToneAndSyllables( + tones: (string | null)[], // Array of tones, one for each syllable. null means any tone. +) { + const res = pdb.fetchWordsByToneAndSyls(tones); + return res; +} + +export async function fetchWordsByToneAndSyllables_gem( syllableCount: number, tones: (number | null)[], // Array of tones, one for each syllable. null means any tone. ): Promise { -- cgit v1.2.3