Skip to content

Commit

Permalink
Merge pull request #47 from agricreation/backend
Browse files Browse the repository at this point in the history
updating backend controller for compoentns to with static likes and c…
  • Loading branch information
moovendhan-v authored Apr 26, 2024
2 parents e1b7b43 + cf2841e commit 59445b3
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion backend/controller/components.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,38 @@ function readFilesInformations(catogriesName, folderName,{data, user}, callback)
if (jsErr) {
return callback(jsErr);
}

// #TODO handle this likes and saved with the real data
const dataObject = {
"post_details": {
"html": htmlContent,
"css": cssContent,
"js": jsContent,
"type" : "components",
"like": {
"isLiked": true,
"likeCount": "100"
},
"saved":{
"isSaved": true,
"savedCount": "100"
},
"comments":{
"count": "10",
"commentsList": [
{
"comment":"testing comments",
"user": "Moovendhan",
"avatar": "testing",
"date": "testing"
},
{
"comment":"testing comments two",
"user": "Agricreations",
"avatar": "testing",
"date": "testing"
}
]
},
"folder_path": data.folder_path,
"folder_name": data.folder_name,
"catogries": data.categories,
Expand Down

0 comments on commit 59445b3

Please sign in to comment.