-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhandler.js
More file actions
32 lines (23 loc) · 938 Bytes
/
handler.js
File metadata and controls
32 lines (23 loc) · 938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
'use strict';
const createBlogService=require('./blog/createBlogService.js');
const getBlogService=require('./blog/getBlogsService.js');
const getBlogsByPresenterIdService=require('./blog/getBlogsByPresenterIdService.js');
const getBlogsByBlogIdService=require('./blog/getBlogsByBlogIdService.js');
//will add more files here
//POST:/blogs
module.exports.createBlog = async (event, context) => {
return createBlogService.createBlog(event,context);
};
//GET:/blogs
module.exports.getBlogs = async (event, context) => {
return getBlogService.getBlogs(event,context);
};
//GET /blogs/presenter/{presenterId}
module.exports.getBlogsByPresenterId = async (event, context) => {
return getBlogsByPresenterIdService.getBlogsByPresenterId(event,context);
};
//GET: /blogs/{blogId}
module.exports.getBlogsByBlogId = async (event, context) => {
return getBlogsByBlogIdService.getBlogsByBlogId(event,context);
};
//changes made here