Rename script

This commit is contained in:
Emmanuel 2023-03-04 10:36:19 +01:00
parent 3a165c1978
commit 5c3f3ceb20

View file

@ -4,7 +4,7 @@ import sade from "sade"
import type { JorfTexteVersion } from "$lib" import type { JorfTexteVersion } from "$lib"
import { db } from "$lib/server/database" import { db } from "$lib/server/database"
async function linkDecretsToLois(): Promise<void> { async function associateDecretsToLois(): Promise<void> {
for (const texteVersion of ( for (const texteVersion of (
await db<{ data: JorfTexteVersion }[]>` await db<{ data: JorfTexteVersion }[]>`
SELECT data SELECT data
@ -30,10 +30,10 @@ async function linkDecretsToLois(): Promise<void> {
} }
} }
sade("link_decrets_and_lois", true) sade("associate_decrets_and_lois", true)
.describe("Link decrets to lois in database") .describe("Associate décrets with lois in database")
.action(async () => { .action(async () => {
await linkDecretsToLois() await associateDecretsToLois()
process.exit(0) process.exit(0)
}) })
.parse(process.argv) .parse(process.argv)