refactor to include both get and post in one function

This commit is contained in:
Ben Ramey
2018-09-20 06:59:22 -05:00
parent 4e114f8de4
commit ac254986b1
4 changed files with 40 additions and 37 deletions

View File

@@ -66,16 +66,13 @@ provider:
# - exclude-me-dir/**
functions:
courses-get:
handler: handlers/courses/get.default
courses:
handler: handlers/courses.default
events:
- http:
path: courses
method: get
cors: true
courses-post:
handler: handlers/courses/post.default
events:
- http:
path: courses
method: post