nextcloud / tables

🍱 Nextcloud tables app
https://apps.nextcloud.com/apps/tables
GNU Affero General Public License v3.0
137 stars 23 forks source link

OCS-API for columns not working #918

Open FahrJo opened 6 months ago

FahrJo commented 6 months ago

Steps to reproduce

  1. install current beta 0.7.0-beta.2 of tables
  2. post a column to an existing table via OCS-API:/ocs/v2.php/apps/tables/api/2/columns/text, alternatively to /ocs/v2.php/apps/tables/api/2/columns/datetime.
  3. Open the table in the browser.

Expected behavior

Table is shown with the newly created column(s)

Actual behavior

Table is not loading, the browser console has the error Unhandled Promise Rejection: Error: text is not a valid column type!

Tables app version

0.7.0-beta.2

Browser

Safari 17.3

Client operating system

MacOS

Operating system

No response

Web server

Apache

PHP engine version

PHP 8.2

Database

MariaDB

Additional info

No response

juliushaertl commented 6 months ago

Thanks for your report. It seems our documentation is not very clear there and also we should probably use a sane default value. I'd assume you didn't specify a subtype (line, rich, link) for the column to be created.

Nevertheless, we should:

curl to reproduce ``` curl --request POST \ --url 'https://admin:admin@nextcloud.local/ocs/v2.php/apps/tables/api/2/columns/text?baseNodeId=1&title=NewColumn' \ --header 'OCS-APIRequest: true' ```