Add function to set speech to failed state

This commit is contained in:
Hongbo Wu 2022-08-22 16:09:56 +08:00
parent 4ce7352013
commit 2298635e56

View file

@ -0,0 +1,9 @@
import { getRepository } from '../entity/utils'
import { Speech, SpeechState } from '../entity/speech'
export const setSpeechFailure = async (id: string) => {
// update state
await getRepository(Speech).update(id, {
state: SpeechState.FAILED,
})
}