init from origin + update
This commit is contained in:
136
server/routers/coder/catalog/cardData.json
Normal file
136
server/routers/coder/catalog/cardData.json
Normal file
@@ -0,0 +1,136 @@
|
||||
{ "status": "success",
|
||||
|
||||
"dataFeatured": [{
|
||||
"title": "Featured",
|
||||
"items": [{
|
||||
"description":"Detailed Explanation of",
|
||||
"title": "Dynamic Programming",
|
||||
"chanptersCount": 6,
|
||||
"itemCount":55,
|
||||
"linkToPage": "/coder/topics/dynamic-programming/",
|
||||
"progressCard": 0,
|
||||
"primeContent": null,
|
||||
"iconCard": "featured1",
|
||||
"slug": "dynamic-programming",
|
||||
"categorySlug": "featured"
|
||||
},{
|
||||
"description":"Detailed Explanation of",
|
||||
"title": "Heap",
|
||||
"chanptersCount": 4,
|
||||
"itemCount":28,
|
||||
"linkToPage": "/coder/topics/heap/",
|
||||
"progressCard": 0,
|
||||
"primeContent": null,
|
||||
"iconCard":"featured2",
|
||||
"slug": "heap"
|
||||
|
||||
},{
|
||||
"description":"Detailed Explanation of",
|
||||
"title": "Graph",
|
||||
"chanptersCount": 6,
|
||||
"itemCount":58,
|
||||
"linkToPage": "/coder/topics/graph/",
|
||||
"progressCard": 0,
|
||||
"primeContent": null,
|
||||
"iconCard":"featured3",
|
||||
"slug": "graph"
|
||||
},{
|
||||
"description":"Introductuion to Data Structure",
|
||||
"title": "Arrays 101",
|
||||
"chanptersCount": 6,
|
||||
"itemCount":31,
|
||||
"linkToPage": "/coder/card/fun-with-arrays/",
|
||||
"progressCard": 0,
|
||||
"primeContent": null,
|
||||
"iconCard":"featured4",
|
||||
"slug": "fun-with-arrays"
|
||||
}]
|
||||
},{
|
||||
"title": "Interview",
|
||||
"items": [{
|
||||
"description":"Get Well Prepared for",
|
||||
"title": "Google Interview",
|
||||
"chanptersCount": 6,
|
||||
"itemCount":55,
|
||||
"linkToPage": "coder/interview/card/google/",
|
||||
"progressCard": 0,
|
||||
"primeContent": 1,
|
||||
"iconCard": "interview1",
|
||||
"slug": "google"
|
||||
},{
|
||||
"description":"Get Well Prepared for",
|
||||
"title": "Facebook",
|
||||
"chanptersCount": 6,
|
||||
"itemCount":55,
|
||||
"linkToPage": "coder/interview/card/facebook/",
|
||||
"progressCard": 0,
|
||||
"primeContent": 1,
|
||||
"iconCard": "interview2",
|
||||
"slug": "facebook"
|
||||
},{
|
||||
"description":"Top Questions from",
|
||||
"title": "Microsoft",
|
||||
"chanptersCount": 6,
|
||||
"itemCount":55,
|
||||
"linkToPage": "coder/interview/card/microsoft/",
|
||||
"progressCard": 0,
|
||||
"primeContent": 1,
|
||||
"iconCard": "interview3",
|
||||
"slug": "microsoft"
|
||||
},{
|
||||
"description":"Top Questions from",
|
||||
"title": "Amazon",
|
||||
"chanptersCount": 8,
|
||||
"itemCount":68,
|
||||
"linkToPage": "coder/interview/card/amazon/",
|
||||
"progressCard": 0,
|
||||
"primeContent": 1,
|
||||
"iconCard": "interview4",
|
||||
"slug": "amazon"
|
||||
}]
|
||||
},{
|
||||
"title": "Learn",
|
||||
"items": [{
|
||||
"description":"Detailed Explanation of",
|
||||
"title": "Graph",
|
||||
"chanptersCount": 6,
|
||||
"itemCount":58,
|
||||
"linkToPage": "coder/learn/card/graph",
|
||||
"progressCard": 0,
|
||||
"primeContent": null,
|
||||
"iconCard": "learn1",
|
||||
"slug": "graph"
|
||||
},{
|
||||
"description":"Introductuion to Data Structure",
|
||||
"title": "Arrays 101",
|
||||
"chanptersCount": 6,
|
||||
"itemCount":55,
|
||||
"linkToPage": "coder/learn/card/fun-with-arrays",
|
||||
"progressCard": 0,
|
||||
"primeContent": null,
|
||||
"iconCard": "learn2",
|
||||
"slug": "fun-with-arrays"
|
||||
},{
|
||||
"description":"Introductuion to Data Structure",
|
||||
"title": "Linked List",
|
||||
"chanptersCount": 6,
|
||||
"itemCount":55,
|
||||
"linkToPage": "coder/learn/card/linked-list",
|
||||
"progressCard": 0,
|
||||
"primeContent": null,
|
||||
"iconCard": "learn3",
|
||||
"slug": "linked-list"
|
||||
},{
|
||||
"description":"Introductuion to Data Structure",
|
||||
"title": "Binary Tree",
|
||||
"chanptersCount": 6,
|
||||
"itemCount":55,
|
||||
"linkToPage": "coder/learn/card/data-structure-tree",
|
||||
"progressCard": 0,
|
||||
"primeContent": null,
|
||||
"iconCard": "learn4",
|
||||
"slug": "data-structure-tree"
|
||||
}]
|
||||
}]
|
||||
}
|
||||
|
||||
3
server/routers/coder/catalog/error.json
Normal file
3
server/routers/coder/catalog/error.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"status": "error"
|
||||
}
|
||||
15
server/routers/coder/catalog/index.js
Normal file
15
server/routers/coder/catalog/index.js
Normal file
@@ -0,0 +1,15 @@
|
||||
// eslint-disable-next-line new-cap
|
||||
const router = require('express').Router();
|
||||
|
||||
router.get('/catalog', (request, response, next) => {
|
||||
setTimeout(() => next());
|
||||
}, (request, response) => {
|
||||
const params = process.env.stub;
|
||||
if (params === 'error') {
|
||||
response.send(require('./error.json'));
|
||||
} else {
|
||||
response.send(require('./cardData.json'));
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user