Skip to content

Commit 0f49a7c

Browse files
committed
only get screwdriver stock from the past year
1 parent f9965ff commit 0f49a7c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/routes/api/lttstore/devData/+server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ export const GET = (async ({platform}) => {
2222
.all()
2323
.then(r => r.results);
2424

25-
const screwdriverStocks = db.prepare("select * from stock_history where id = 6649895092327")
25+
const screwdriverStocks = db.prepare("select * from stock_history where id = 6649895092327 and timestamp > ?")
26+
.bind(Date.now() - (365 * 24 * 60 * 60e3))
2627
.all()
2728
.then(r => r.results);
2829

0 commit comments

Comments
 (0)