appwrite / templates

Templates for Appwrite Functions ⚡️🌩️
https://appwrite.io
MIT License
127 stars 102 forks source link

refactor: removed unused import in template #283

Closed xuelink closed 6 months ago

xuelink commented 6 months ago

What does this PR do?

This PR removes an unused import that was no longer needed in the codebase. Fixes following error

file:///usr/local/server/src/function/src/main.js:1
import { OpenAIApi, Configuration } from 'openai';
                    ^^^^^^^^^^^^^
SyntaxError: The requested module 'openai' does not provide an export named 'Configuration'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:191:5)
    at async ModuleLoader.import (node:internal/modules/esm/loader:336:24)
    at async importModuleDynamicallyWrapper (node:internal/vm/module:429:15)
    at async execute (/usr/local/server/src/server.js:142:32)
    at async action (/usr/local/server/src/server.js:174:13)
    at async /usr/local/server/src/server.js:10:9

Test Plan

To verify these changes:

  1. Manually review the affected code files to ensure the import is no longer referenced.
  2. Run the test suite to ensure no regressions have been introduced.
  3. Deploy the application with these changes and perform both manual and automated tests to validate functionality.

Related PRs and Issues

No related PRs or issues are associated with this change.

Have you read the Contributing Guidelines on issues?

Yes, I have read the Contributing Guidelines on issues.