2
0

🚑 Fix youtube URL detection regex

This commit is contained in:
Baptiste Arnaud
2024-06-26 11:20:53 +02:00
parent 6af47a8cfe
commit 3b405dc7d5
2 changed files with 5 additions and 13 deletions

View File

@ -31,7 +31,7 @@ export const verticalVideoSuggestionSize = {
const youtubeBaseUrl = 'https://www.youtube.com/embed' const youtubeBaseUrl = 'https://www.youtube.com/embed'
export const youtubeRegex = export const youtubeRegex =
/youtube\.com\/(watch\?v=|shorts\/)([\w-]+)|youtu\.be\/([\w-]+)(\?.+)/ /youtube\.com\/(watch\?v=|shorts\/)([\w-]+)|youtu\.be\/([\w-]+)(\?.+)*/
export const youtubeEmbedParamsMap = { export const youtubeEmbedParamsMap = {
t: 'start', t: 'start',

View File

@ -34,17 +34,6 @@ export const destroyUser = async (userEmail?: string) => {
console.log(`Found ${workspaces.length} workspaces`) console.log(`Found ${workspaces.length} workspaces`)
if (workspaces.some((w) => w.plan !== Plan.FREE)) {
console.log(
`Some workspaces have a plan other than FREE. Something is wrong. Logging and exiting...`
)
writeFileSync(
'logs/workspaces-issue.json',
JSON.stringify(workspaces, null, 2)
)
return
}
if ( if (
workspaces.some((w) => workspaces.some((w) =>
w.members.some((m) => m.user.email && m.user.email !== email) w.members.some((m) => m.user.email && m.user.email !== email)
@ -60,7 +49,10 @@ export const destroyUser = async (userEmail?: string) => {
return return
} }
console.log('All workspaces have a FREE plan') console.log(
'Workspaces plans:',
workspaces.map((w) => w.plan)
)
const proceed = await confirm({ message: 'Proceed?' }) const proceed = await confirm({ message: 'Proceed?' })
if (!proceed || typeof proceed !== 'boolean') { if (!proceed || typeof proceed !== 'boolean') {