AppFeedback (TypeScript)
    Preparing search index...

    Function appwriteHandler

    • Appwrite Functions handler. Bridges Appwrite's req/res to the web-standard createFetchHandler so it shares the same validation, wire format, and CORS handling. Pass FetchHandlerOptions to enable CORS (e.g. { allowedOrigin: '*' }) — the OPTIONS preflight is then answered for you. Example:

      import { appwriteHandler } from '@appfeedback/relay' export default appwriteHandler({ githubToken: process.env.GITHUB_TOKEN!, owner: 'o', repo: 'r', }, { allowedOrigin: 'https://acme.com' })

      Parameters

      Returns (
          __namedParameters: {
              req: {
                  body?: string;
                  bodyJson?: unknown;
                  bodyRaw?: string;
                  headers?: Record<string, string | undefined>;
                  method: string;
              };
              res: {
                  json(
                      data: unknown,
                      status?: number,
                      headers?: Record<string, string>,
                  ): unknown;
                  send(
                      body: string,
                      status?: number,
                      headers?: Record<string, string>,
                  ): unknown;
              };
          },
      ) => Promise<unknown>