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