Skip to content

Commit

Permalink
#30 - Updated aws endpoints.
Browse files Browse the repository at this point in the history
  • Loading branch information
douglascvas committed Sep 4, 2018
1 parent c598a71 commit f10e620
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 24 deletions.
31 changes: 12 additions & 19 deletions backend/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,32 +26,32 @@ provider:

functions:
auth:
handler: auth/auth.auth
handler: src/main/auth/auth.auth
cors: true
currentTime:
handler: utils/ping.endpoint
handler: src/main/utils/ping.endpoint
events:
- http:
path: ping
method: get
loggedin:
handler: auth/loggedin.loggedin
handler: src/main/auth/loggedin.loggedin
events:
- http:
path: authcheck
method: get
authorizer: auth
cors: true
create:
handler: rides/create.create
handler: src/main/rides/awsLambdaRidesApis.create
events:
- http:
path: rides
method: post
cors: true

update:
handler: rides/update.update
handler: src/main/rides/awsLambdaRidesApis.update
events:
- http:
path: rides/{id}
Expand All @@ -63,7 +63,7 @@ functions:
id: true

list:
handler: rides/list.list
handler: src/main/rides/awsLambdaRidesApis.list
# runtime: nodejs8.10
events:
- http:
Expand All @@ -72,7 +72,7 @@ functions:
cors: true

findone:
handler: rides/findone.findone
handler: src/main/rides/awsLambdaRidesApis.findOne
events:
- http:
path: rides/{id}
Expand All @@ -82,18 +82,11 @@ functions:
parameters:
paths:
id: true
maps:
handler: map/maps.maps
events:
- http:
path: map
method: get
cors: true
notify:
handler: notify
events:
- schedule: rate(2 hours)
- schedule: cron(0 12 * * ? *)
# notify:
# handler: notify
# events:
# - schedule: rate(2 hours)
# - schedule: cron(0 12 * * ? *)
resources:
Resources:
GatewayResponse:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const CreateRideService = require('../rides/CreateRideService');
const ListRidesService = require('../rides/ListRidesService');
const FindOneRideService = require('../rides/FindOneRideService');
const CreateRideService = require('./CreateRideService');
const ListRidesService = require('./ListRidesService');
const FindOneRideService = require('./FindOneRideService');
const DatabaseManager = require('../database/DatabaseManager');
const AwsLambdaRideApis = require('../rides/aws/AwsLambdaRideApis');
const AwsLambdaRideApis = require('./aws/AwsLambdaRideApis');
const databaseManager = new DatabaseManager();

const createRideService = new CreateRideService(databaseManager);
Expand All @@ -12,5 +12,5 @@ const findOneRideService = new FindOneRideService(databaseManager);
const rides = new AwsLambdaRideApis(createRideService, listRidesService, findOneRideService);

module.exports = {
rides: rides
...rides
};

0 comments on commit f10e620

Please sign in to comment.