Fix a bug

This commit is contained in:
Hongbo Wu 2022-08-24 22:33:55 +08:00
parent 99a628f03f
commit 7f83045c0c
2 changed files with 1 additions and 5 deletions

View file

@ -21,10 +21,6 @@ const logger = buildLogger('app.dispatch')
export function speechServiceRouter() {
const router = express.Router()
router.options(
'/auto-synthesis',
cors<express.Request>({ ...corsConfig, maxAge: 600 })
)
// eslint-disable-next-line @typescript-eslint/no-misused-promises
router.post('/auto-synthesize', async (req, res) => {
logger.info('auto-synthesize')

View file

@ -21,7 +21,7 @@ export const shouldSynthesize = async (
userId: string,
page: Page
): Promise<boolean> => {
if (process.env.TEXT_TO_SPEECH_BETA_TEST === 'true') {
if (process.env.TEXT_TO_SPEECH_BETA_TEST) {
return true
}