various fixes to get it working for myself
This commit is contained in:
15
debug/check_last_item.mjs
Normal file
15
debug/check_last_item.mjs
Normal file
@@ -0,0 +1,15 @@
|
||||
import db from "../src/inc/sql.mjs";
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
const item = (await db`select * from items order by id desc limit 1`)?.[0];
|
||||
console.log("Last Item:", item);
|
||||
if (item) {
|
||||
const tags = await db`select * from tags_assign where item_id = ${item.id}`;
|
||||
console.log("Tags:", tags);
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
process.exit(0);
|
||||
})();
|
||||
Reference in New Issue
Block a user