Skip to content

Commit

Permalink
Merge pull request #77 from Parth18Shah/remove_email
Browse files Browse the repository at this point in the history
 removed user email from post details page  #47
  • Loading branch information
VaibhavArora314 authored Jun 3, 2024
2 parents d995938 + f1acc59 commit 6e2c5e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 0 additions & 2 deletions backend/src/routes/post/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ export const getPostController = async (req: Request, res: Response) => {
select: {
id: true,
username: true,
email: true,
},
},
},
Expand Down Expand Up @@ -167,7 +166,6 @@ export const getPostsWithPagination = async (req: Request, res: Response) => {
select: {
id: true,
username: true,
email: true,
},
},
},
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/pages/Post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ const Post = () => {
<div className="p-6 text-white max-w-screen-xl mx-auto">
{post && (
<>
<button onClick={() => window.history.back()} className="mb-4 px-2 py-1 bg-blue-600 hover:bg-blue-700 text-white text-sm rounded">
<svg xmlns="http://www.w3.org/2000/svg" className="h-4 w-4 inline-block" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M10 19l-7-7m0 0l7-7m-7 7h18" />
</svg>
</button>
<h2 className="text-2xl font-semibold mb-4">{post.title}</h2>
<p className="mb-4">{post.description}</p>
<div className="relative mb-4">
Expand Down Expand Up @@ -157,7 +162,6 @@ const Post = () => {
<div className="mb-4">
<h3 className="text-xl font-semibold mb-2">Author</h3>
<p>Username: {post.author.username}</p>
<p>Email: {post.author.email}</p>
</div>
</>
)}
Expand Down

0 comments on commit 6e2c5e3

Please sign in to comment.