Back

[SOLVED] TypeError: teams.updatePrefs is not a function

  • 0
  • Teams
  • Functions
  • Cloud
Alain Iglesias
12 Jun, 2023, 14:54

I'm triggering a function on a teams.*.create event. The functions should update the team's preferences. The issue comes with it says updatePrefs is not a function.

TL;DR
Solution: The issue is that the function `teams.updatePrefs` is not available in the current version being used. To resolve this, the user should update to version 1.3.x using the provided commands. Additionally, it is mentioned that the cloud version is on version 1.1.2, which does not have the `updatePrefs` function.
Binyamin
12 Jun, 2023, 14:55

Is this in the cloud? updatePrefs is a new function which was introduced on version 1.3.x The cloud is on version 1.1.2

Alain Iglesias
12 Jun, 2023, 14:56

oh dear, apologies, not aware of that little detail <:appwritepeepo:902865250427215882> thanks!

Alain Iglesias
12 Jun, 2023, 15:48

Another question, the one click one with Digital Ocean is up-to-date?

Binyamin
12 Jun, 2023, 15:53

I think it's up-to-date wit the first 1.3.0 version

You can check here: https://github.com/appwrite/integration-for-digitalocean

But, you can install the one-click, And then right away run these 4 upgrade commands.

TypeScript
cd /root/

docker run -it --rm \
    --volume /var/run/docker.sock:/var/run/docker.sock \
    --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
    --entrypoint="install" \
    appwrite/appwrite:1.3.7

cd /root/appwrite/

docker compose exec appwrite migrate
Alain Iglesias
12 Jun, 2023, 15:54

super cool!

Drake
12 Jun, 2023, 16:16

[SOLVED] TypeError: teams.updatePrefs is not a function

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more