async updateList()

in src/Worker.ts [266:293]


  async updateList() {
    const client = await this.kintoneClientCreator.createKintoneClient(
      this.apps.lists.token
    );
    let listRecordId = await ApiExecutor.getRecordIdFromList(
      client,
      this.apps.lists.id,
      this.trelloAction.data
    );
    if (listRecordId === undefined) {
      await ApiExecutor.createList(
        client,
        this.apps.lists.id,
        this.trelloAction.data
      );
      listRecordId = await ApiExecutor.getRecordIdFromList(
        client,
        this.apps.lists.id,
        this.trelloAction.data
      );
    }
    return ApiExecutor.updateList(
      client,
      this.apps.lists.id,
      this.trelloAction.data,
      listRecordId as string
    );
  }