diff --git a/package-lock.json b/package-lock.json index 67d6588..0eed028 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.6.4", "license": "MIT", "dependencies": { - "@nuxt/kit": "^3.1.2", + "@nuxt/kit": "^3.6.5", "appwrite": "^10.2.0", "node-appwrite": "^8.2.0" }, diff --git a/package.json b/package.json index 1e391e0..78c8a5b 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "test:watch": "vitest watch" }, "dependencies": { - "@nuxt/kit": "^3.1.2", + "@nuxt/kit": "^3.6.5", "appwrite": "^10.2.0", "node-appwrite": "^8.2.0" }, diff --git a/src/runtime/composables/useAppwriteServer.ts b/src/runtime/composables/useAppwriteServer.ts index 1c2b68b..0d7a0de 100644 --- a/src/runtime/composables/useAppwriteServer.ts +++ b/src/runtime/composables/useAppwriteServer.ts @@ -1,7 +1,5 @@ import { Client, Databases, Users, Account, Storage, Avatars, Functions, Role, Permission, Query, ID, AppwriteException, Graphql, Locale, Teams, Health, InputFile } from 'node-appwrite' -const config = useRuntimeConfig() - class AppwriteServer { client: Client; users: Users; @@ -24,9 +22,9 @@ class AppwriteServer { constructor() { this.client = new Client(); this.client - .setEndpoint(config.public.APPWRITE_ENDPOINT) // Your API Endpoint - .setProject(config.public.APPWRITE_PROJECT_ID) // Your project ID - .setKey(config.appwrite.APPWRITE_API_KEY) // Your secret API key + .setEndpoint(process.env.APPWRITE_ENDPOINT || '') // Your API Endpoint + .setProject(process.env.APPWRITE_PROJECT_ID || '') // Your project ID + .setKey(process.env.APPWRITE_API_KEY || '') // Your secret API key this.databases = new Databases(this.client); this.users = new Users(this.client) this.account = new Account(this.client);