Compare commits

..

No commits in common. "23459bc0fd0e6a11a665ddbc44ee3e4b10e4f61f" and "d725fef5fa816e8f5d10da33bead2d2636edfc24" have entirely different histories.

2 changed files with 2 additions and 2 deletions

View File

@ -4,6 +4,6 @@
"create": "deno run --allow-read=scrappy.db,scrappy.db-journal --allow-write=scrappy.db,scrappy.db-journal main.ts create",
"run": "deno run --allow-net=youtube.com main.ts run",
"new": "deno run --allow-read=scrappy.db,scrappy.db-journal --allow-write=scrappy.db,scrappy.db-journal main.ts new",
"get": "deno run --allow-net=www.youtube.com --allow-run --allow-read=scrappy.db,scrappy.db-journal --allow-write main.ts get"
"get": "deno run --allow-net=www.youtube.com --allow-run --allow-read=scrappy.db,scrappy.db-journal --allow-write=scrappy.db,scrappy.db-journal main.ts get"
}
}

View File

@ -10,7 +10,7 @@ const db = new DB("scrappy.db");
const command = Deno.args[0];
if (command === "create") {
db.execute(`create table if not exists channel (id INTEGER PRIMARY KEY AUTOINCREMENT, channel_id text not null unique, channel_name text not null, last_seen_at number not null default 0);`);
db.execute(`create table channel (id INTEGER PRIMARY KEY AUTOINCREMENT, channel_id text not null unique, channel_name text not null, last_seen_at number not null default 0);`);
}
else if (command === "new" && Deno.args.length == 3) {
const channelId = Deno.args[1];