Skip to content

Commit

Permalink
Merge pull request #534 from appwrite/fix-dart-env-var
Browse files Browse the repository at this point in the history
Fix Dart environment variable syntax
  • Loading branch information
loks0n authored Jan 19, 2024
2 parents 1d43024 + f9556be commit 4ee3dba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/routes/docs/products/functions/examples/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@ Future main(final context) async {

final client = Client()
.setEndpoint('https://cloud.appwrite.io/v1')
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
.setKey(process.env.APPWRITE_API_KEY);
.setProject(Platform.environment['APPWRITE_FUNCTION_PROJECT_ID'])
.setKey(Platform.environment['APPWRITE_API_KEY']);

final database = Database(client);

Expand Down Expand Up @@ -757,8 +757,8 @@ Future main(final context) async {

final client = Client()
.setEndpoint('https://cloud.appwrite.io/v1')
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
.setKey(process.env.APPWRITE_API_KEY);
.setProject(Platform.environment['APPWRITE_FUNCTION_PROJECT_ID'])
.setKey(Platform.environment['APPWRITE_API_KEY']);

final databases = Database(client);
final document = await databases.createDocument('[DATABASE_ID]', '[MESSAGES_COLLECTION_ID]', ID.unique(), message);
Expand Down

0 comments on commit 4ee3dba

Please sign in to comment.