Update team preferences retrieval method

This commit is contained in:
Ebenezer Don
2025-06-20 18:36:40 +01:00
parent 36ee901202
commit 92720008c8

View File

@@ -195,10 +195,10 @@ promise.then(function (response) {
}); });
// Get team preferences // Get team preferences
const promise = teams.get('<TEAM_ID>'); const promise = teams.getPrefs('<TEAM_ID>');
promise.then(function (team) { promise.then(function (prefs) {
console.log(team.prefs); // Team preferences console.log(prefs); // Team preferences
}, function (error) { }, function (error) {
console.log(error); console.log(error);
}); });
@@ -223,10 +223,9 @@ final team = await teams.updatePrefs(
); );
// Get team preferences // Get team preferences
final teamData = await teams.get( final prefs = await teams.getPrefs(
teamId: '<TEAM_ID>' teamId: '<TEAM_ID>'
); );
final prefs = teamData.prefs;
``` ```
```client-apple ```client-apple
import Appwrite import Appwrite
@@ -248,10 +247,9 @@ let team = try await teams.updatePrefs(
) )
// Get team preferences // Get team preferences
let teamData = try await teams.get( let prefs = try await teams.getPrefs(
teamId: "<TEAM_ID>" teamId: "<TEAM_ID>"
) )
let prefs = teamData.prefs
``` ```
```client-android-kotlin ```client-android-kotlin
import io.appwrite.Client import io.appwrite.Client
@@ -274,10 +272,9 @@ val team = teams.updatePrefs(
) )
// Get team preferences // Get team preferences
val teamData = teams.get( val prefs = teams.getPrefs(
teamId = "<TEAM_ID>" teamId = "<TEAM_ID>"
) )
val prefs = teamData.prefs
``` ```
{% /multicode %} {% /multicode %}