From de4d49c5800fa6b584bd70215f87303168b93824 Mon Sep 17 00:00:00 2001 From: 3nprob <3nprob@3nprob> Date: Fri, 8 Oct 2021 16:42:13 +0900 Subject: [PATCH] Rename user-posts template to posts --- src/handlers.ts | 4 ++-- templates/{user-posts.pug => posts.pug} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename templates/{user-posts.pug => posts.pug} (100%) diff --git a/src/handlers.ts b/src/handlers.ts index 3fcdb11..c28eef5 100644 --- a/src/handlers.ts +++ b/src/handlers.ts @@ -46,7 +46,7 @@ export const handleUser = async (request: Hapi.Request, h: Hapi.ResponseToolkit) const userID = request.params.userID; const user = await fetchUserInfo(userID); const posts = await fetchUserPosts(userID); - return h.view('user-posts', { + return h.view('posts', { posts, user, pageTitle: CONFIG.page_title, @@ -61,7 +61,7 @@ export const handleTag = async (request: Hapi.Request, h: Hapi.ResponseToolkit) } const tagID = request.params.tagID; const result = await fetchTagPosts(tagID); - return h.view('user-posts', { + return h.view('posts', { posts: result.items, pageTitle: CONFIG.page_title, tag: result, diff --git a/templates/user-posts.pug b/templates/posts.pug similarity index 100% rename from templates/user-posts.pug rename to templates/posts.pug