♻️ Use unified post list api
This commit is contained in:
		| @@ -29,9 +29,10 @@ export default function RealmPage() { | ||||
|  | ||||
|   async function readPosts(pn?: number) { | ||||
|     if (pn) setPage(pn); | ||||
|     const res = await fetch(`/api/realms/${params["realmId"]}/posts?` + new URLSearchParams({ | ||||
|     const res = await fetch(`/api/posts?` + new URLSearchParams({ | ||||
|       take: (10).toString(), | ||||
|       offset: ((page() - 1) * 10).toString() | ||||
|       offset: ((page() - 1) * 10).toString(), | ||||
|       realmId: params["realmId"], | ||||
|     })); | ||||
|     if (res.status !== 200) { | ||||
|       setError(await res.text()); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user