Open SAQIBJH opened 7 months ago
hey brother how do you dothat... i am impressed please connect with me i will be follow you so please help me to write controllers
Yeah sure.
On Tue, 14 May, 2024, 22:49 Chandan Polai, @.***> wrote:
hey brother how do you dothat... i am impressed please connect with me i will be follow you so please help me to write controllers
— Reply to this email directly, view it on GitHub https://github.com/hiteshchoudhary/chai-backend/pull/110#issuecomment-2110748652, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVPQ7QSN4V3GF3U7YV36A53ZCJBRRAVCNFSM6AAAAABF3XQRK6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJQG42DQNRVGI . You are receiving this because you authored the thread.Message ID: @.***>
brother can you help me please i was so impressed in last 3 hours i was only see your controllers how you write and how you think customize the models wow mene bhi delete photot video functionality add kiya tha per mene kabhi socha nahi tha ki direct models me hi define karde public url wow 😊😊😊 and you have created folder on cloudnairy such great thing.
my whatapp:- 7069472565
I have added an aggregation pipeline to the dashboard, which will optimize the performance while processing complex data because now it will process data at the database engine.
I didnt get it bro,
On Sat, 8 Jun, 2024, 01:55 Navin grg, @.***> wrote:
@.**** commented on this pull request.
In src/controllers/tweet.controllers.js https://github.com/hiteshchoudhary/chai-backend/pull/110#discussion_r1631655233 :
+const deleteTweet = asyncHandler(async (req, res) => {
- const { tweetId } = req.params;
- const user = await User.findById(req.user?._id, { _id: 1 });
- if (!user) throw new ApiError(404, "User not found");
- if (!isValidObjectId(tweetId))
- throw new ApiError(404, "Not found tweet for this id")
- const tweet = await Tweet.findById(tweetId, { _id: 1 });
- if (!tweet) throw new ApiError(404, "Tweet not found");
- const deletedTweet = await Tweet.findByIdAndDelete(tweetId);
- if(!deletedTweet) throw new ApiError(500, "Something went wrong while deleting tweet")
I guess uh also have to delete the tweet from the user tweets array right?
— Reply to this email directly, view it on GitHub https://github.com/hiteshchoudhary/chai-backend/pull/110#pullrequestreview-2105308964, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVPQ7QTLFY533HGNHRGQJ23ZGIJLFAVCNFSM6AAAAABF3XQRK6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDCMBVGMYDQOJWGQ . You are receiving this because you authored the thread.Message ID: @.***>
I have successfully completed the assignment,I have attach a link of testing folder, I have used postman for api testing, you can see the link in my readme. it is not over now in future I will try to add more functionality I want to thanks Hitesh sir, who gave us this beautiful chance to learn and grow...