Add: Post Metrics
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { getCommentsForPost } from "$lib/server/db/comment";
|
||||
import { getPost } from "$lib/server/db/post";
|
||||
import { getPostMetrics } from "$lib/server/db/postmertics";
|
||||
import { getIdFromName } from "$lib/util";
|
||||
import { error } from "@sveltejs/kit";
|
||||
|
||||
@@ -15,6 +16,8 @@ export async function load({ params, locals }) {
|
||||
|
||||
const comments = await getCommentsForPost(locals.sql, post_id);
|
||||
|
||||
console.log(await getPostMetrics(post));
|
||||
|
||||
return {
|
||||
post: post,
|
||||
comments: comments
|
||||
|
||||
Reference in New Issue
Block a user