From 175ddca375cef765cec8ca5bbc527a205c40bf25 Mon Sep 17 00:00:00 2001 From: polwex Date: Tue, 3 Jun 2025 15:41:31 +0700 Subject: preeeeettty much done FUCK YES --- src/actions/tones.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/actions') diff --git a/src/actions/tones.ts b/src/actions/tones.ts index 0f28612..7d9cb34 100644 --- a/src/actions/tones.ts +++ b/src/actions/tones.ts @@ -1,6 +1,9 @@ "use server"; +import db from "@/lib/db"; import pdb from "@/lib/db/prosodydb"; +import { MutationOrder } from "@/lib/types/phonetics"; +import { randomFromArray } from "@/lib/utils"; import { WordData } from "@/zoom/logic/types"; // Helper to extract tone from prosody - assuming prosody is an array of objects like [{tone: number}, ...] @@ -10,6 +13,13 @@ const getTonesFromProsody = (prosody: any): number[] | null => { } return null; }; + +export async function mutateToneSelection( + order: MutationOrder, // Array of tones, one for each syllable. null means any tone. +) { + const res = pdb.fetchWordsByToneSylsWords(order); + return res; +} export async function fetchWordsByToneAndSyllables( tones: (string | null)[], // Array of tones, one for each syllable. null means any tone. ) { -- cgit v1.2.3