mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-21 18:04:39 -05:00
Add (working) script to remove bad custom urls
This commit is contained in:
parent
1a8ede563e
commit
9bb7de7dba
|
|
@ -19,6 +19,7 @@
|
|||
"create-analyzer-json": "node --experimental-specifier-resolution=node --loader ts-node/esm -r tsconfig-paths/register scripts/create-analyzer-json.ts",
|
||||
"check-translation-jsons": "node --experimental-specifier-resolution=node --loader ts-node/esm -r tsconfig-paths/register scripts/check-translation-jsons.ts && npm run prettier:write",
|
||||
"replace-img-names": "node --experimental-specifier-resolution=node --loader ts-node/esm -r tsconfig-paths/register scripts/replace-img-names.ts",
|
||||
"remove-bad-custom-urls": "node --experimental-specifier-resolution=node --loader ts-node/esm -r tsconfig-paths/register scripts/remove-bad-custom-urls.ts",
|
||||
"lint:ts": "eslint . --ext .ts,.tsx",
|
||||
"lint:styles": "stylelint \"app/styles/**/*.css\"",
|
||||
"prettier:check": "prettier --check . --loglevel warn",
|
||||
|
|
|
|||
9
scripts/remove-bad-custom-urls.ts
Normal file
9
scripts/remove-bad-custom-urls.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/* eslint-disable no-console */
|
||||
import "dotenv/config";
|
||||
import { sql } from "~/db/sql";
|
||||
|
||||
sql
|
||||
.prepare(`update "User" set "customUrl" = NULL where "customUrl" like '%/%'`)
|
||||
.run();
|
||||
|
||||
console.log("Done");
|
||||
Loading…
Reference in New Issue
Block a user