const createContract = require('./addContract/index');
const getContract = require('./getContract/index');
const updateContract = require('./updateContract/index');
const deleteContract = require('./deleteContract/index');

// 云函数入口函数
exports.main = async (event, context) => {
  switch (event.type) {
    case 'get':
      return await getContract.main(event, context);
    case 'add':
      return await createContract.main(event, context);
    case 'update':
      return await updateContract.main(event, context);
    case 'delete':
      return await deleteContract.main(event, context);
  }
};