public async postAction()

in src/Worker.ts [69:113]


  public async postAction() {
    const result = [];

    switch (this.trelloAction.type) {
      case ActionType.CREATE_CARD: {
        result.push(await this.registerRecordIdToTrello());
        result.push(await this.addRecordIdToCardNameOfTrello());
        break;
      }
      case ActionType.COPY_CARD: {
        result.push(this.registerRecordIdToTrello());
        result.push(await this.addRecordIdToCardNameOfTrello());
        break;
      }
      case ActionType.UPDATE_CARD: {
        result.push(await this.addRecordIdToCardNameOfTrello());
        result.push(await this.addTimeOfDoneToRecord());
        break;
      }
      case ActionType.ADD_LABEL_TO_CARD: {
        result.push(await this.addRecordIdToCardNameOfTrello());
        break;
      }
      case ActionType.REMOVE_LABEL_FROM_CARD: {
        result.push(await this.addRecordIdToCardNameOfTrello());
        break;
      }
      case ActionType.ADD_MEMBER_TO_CARD: {
        result.push(await this.addRecordIdToCardNameOfTrello());
        break;
      }
      case ActionType.REMOVE_MEMBER_FROM_CARD: {
        result.push(await this.addRecordIdToCardNameOfTrello());
        break;
      }
      case ActionType.COMMENT_CARD: {
        result.push(await this.addRecordIdToCardNameOfTrello());
        break;
      }
      case ActionType.ADD_ATTACHMENT_TO_CARD: {
        result.push(await this.addRecordIdToCardNameOfTrello());
      }
    }
    return Promise.resolve(result);
  }