2.0.0 • Published 5 years ago

@janiscommerce/sls-api-save v2.0.0

Weekly downloads
4
License
ISC
Repository
github
Last release
5 years ago

Serverless API Save

Build Status Coverage Status

An integration handler for Serverless and JANIS Views API Save

Installation

npm install @janiscommerce/sls-api-save

Usage

  • API Save Data
'use strict';

const { SlsApiSaveData } = require('@janiscommerce/sls-api-save');

module.exports.handler = (...args) => SlsApiSaveData.handler(...args);

Function minimal configuration

functions:
  ViewsSaveCreateApi:
    handler: path/to/your.handler
    events:
      - http:
          integration: lambda
          path: view/{entity}/save/data
          method: POST
          request:
            parameters:
              paths:
                entity: true

  ViewsSaveEditApi:
    handler: path/to/your.handler
    events:
      - http:
          integration: lambda
          path: view/{entity}/save/data/{entityId}
          method: PUT
          request:
            parameters:
              paths:
                entity: true
                entityId: true