Commit a092f3d1 authored by Lee Soobeom's avatar Lee Soobeom
Browse files

postdb

parent d9878696
......@@ -43,12 +43,12 @@ export const getPosts = async () => {
//Update
export const addOneCount = async (_id: string, counts: number) => {
const newCounts = await Post.findOneAndUpdate(
const updatedPost = await Post.findOneAndUpdate(
{ _id: _id },
{ counts: counts },
{ new: true }
);
return newCounts;
return updatedPost;
};
export const updatePostRow = async (post: PostType, postId: string) => {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment