public async action()

in src/Worker.ts [22:67]


  public async action() {
    switch (this.trelloAction.type) {
      case ActionType.CREATE_CARD: {
        return this.createCard();
      }
      case ActionType.UPDATE_CARD: {
        return this.updateCard();
      }
      case ActionType.COPY_CARD: {
        return this.copyCard();
      }
      case ActionType.CREATE_LIST: {
        return this.createList();
      }
      case ActionType.UPDATE_LIST: {
        return this.updateList();
      }
      case ActionType.CREATE_LABEL: {
        return this.createLabel();
      }
      case ActionType.UPDATE_LABEL: {
        return this.updateLabel();
      }
      case ActionType.ADD_LABEL_TO_CARD: {
        return this.addLabelToCard();
      }
      case ActionType.REMOVE_LABEL_FROM_CARD: {
        return this.removeLabelFromCard();
      }
      case ActionType.ADD_MEMBER_TO_CARD: {
        return this.addMemberToCard();
      }
      case ActionType.REMOVE_MEMBER_FROM_CARD: {
        return this.removeMemberFromCard();
      }
      case ActionType.COMMENT_CARD: {
        return this.commentCard();
      }
      case ActionType.ADD_ATTACHMENT_TO_CARD: {
        console.log("Add attachment to card");
        return this.attachmentToCard();
      }
    }

    return Promise.resolve({ app: "", record: {} });
  }