const login = require('./login/index');
const getUser = require('./getUser/index');
const addUser = require('./addUser/index');
const deleteUser = require('./deleteUser/index');
const updateUser = require('./updateUser/index');

// 云函数入口函数
exports.main = async (event, context) => {
  switch (event.type) {
    case 'add':
      return await addUser.main(event, context);
    case 'delete':
      return await deleteUser.main(event, context);
    case 'update':
      return await updateUser.main(event, context);
    case 'login':
      return await login.main(event, context);
    case 'get':
      return await getUser.main(event, context);
  }
};