mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-05-11 18:36:17 +02:00
generate random title
This commit is contained in:
parent
31e1f5bc3c
commit
73e5ade529
1 changed files with 2 additions and 1 deletions
|
@ -78,7 +78,7 @@ interface insertTitleParams extends baseParams {
|
|||
}
|
||||
const defaultTitleParams: insertTitleParams = {
|
||||
videoID: "",
|
||||
title: "test-title",
|
||||
title: "",
|
||||
original: false,
|
||||
userID: "",
|
||||
service: Service.YouTube,
|
||||
|
@ -92,6 +92,7 @@ export const insertTitle = async (db: IDatabase, overrides: insertTitleParams =
|
|||
identifier = identifier ?? genRandom();
|
||||
const defaults = generateDefaults(identifier);
|
||||
const params = { ...defaultTitleParams, ...defaults, ...overrides };
|
||||
params.title = genRandomValue("title", identifier);
|
||||
// convert bool to 0 | 1
|
||||
params.original = Number(params.original);
|
||||
await db.prepare("run", query, Object.values(params));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue