From 9dfd6aa77518b3a1e6bfd926a3b7719c32a8c97f Mon Sep 17 00:00:00 2001 From: kartofen Date: Mon, 24 Oct 2022 23:19:33 +0300 Subject: use the new api --- src/pages/board/[board].astro | 2 -- src/pages/board/[board]/[tid].astro | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src/pages/board') diff --git a/src/pages/board/[board].astro b/src/pages/board/[board].astro index eaea03e..de76964 100644 --- a/src/pages/board/[board].astro +++ b/src/pages/board/[board].astro @@ -15,8 +15,6 @@ const data = await api('get', `board/${board}`); if(data.status === 404) return Astro.redirect('/404'); const threads: Thread[] = await data.json(); -for(let thread of threads) - await processThreadIn(board, thread); --- diff --git a/src/pages/board/[board]/[tid].astro b/src/pages/board/[board]/[tid].astro index e9b345a..fa2f104 100644 --- a/src/pages/board/[board]/[tid].astro +++ b/src/pages/board/[board]/[tid].astro @@ -10,12 +10,12 @@ import { api } from '../../../lib/api'; import { processThreadIn } from '../../../lib/thread'; const { board, tid } = Astro.params; -const data = await api('get', `thread/${board}/${tid}`); +const data = await api('get', `board/${board}/${tid}`); if(data.status === 404) return Astro.redirect('/404'); const thread: Thread = await data.json(); -await processThreadIn(board, thread, true); +processThreadIn(board, thread); --- -- cgit v1.2.3