/
githubmirror
/
tldraw
Обзор
Документация
Войти
/
githubmirror
/
tldraw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
apps/docs/utils/addAuthors.ts
17 строк
514 B
Mime Čuvalo
chore: sort imports using oxfmt (#8330)
24 мар 2026, 15:22
Не верифицирован
24 мар 2026, 15:22
374dfed
Код
Авторство
О чём код?
import { Database } from 'sqlite' import sqlite3 from 'sqlite3' import { Authors } from '@/types/content-types' // Adding content export async function addAuthors( db: Database<sqlite3.Database, sqlite3.Statement>, authors: Authors ) { const authorInsert = await db.prepare( `REPLACE INTO authors (id, name, email, twitter, image) VALUES (?, ?, ?, ?, ?)` ) // update authors for (const author of authors) { await authorInsert.run(author.id, author.name, author.email, author.twitter, author.image) } }