Skip to content

Commit

Permalink
(WEB-92) run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
GetBlackBoxSolutions committed Sep 6, 2024
1 parent 3d8f1d9 commit be3428d
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 53 deletions.
36 changes: 18 additions & 18 deletions src/app/api/people/route.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import 'server-only';
export const dynamic = 'force-dynamic';

import client from '../../../../lib/appwrite_client';
import { Databases } from 'appwrite';

import { NextResponse } from 'next/server';

const databases = new Databases(client);

export async function GET() {
const response = await databases.listDocuments(
process.env.APPWRITE_DATABASE_ID as string,
'peoples'
);

return NextResponse.json(response);
}
import 'server-only';
export const dynamic = 'force-dynamic';

import client from '../../../../lib/appwrite_client';
import { Databases } from 'appwrite';

import { NextResponse } from 'next/server';

const databases = new Databases(client);

export async function GET() {
const response = await databases.listDocuments(
process.env.APPWRITE_DATABASE_ID as string,
'peoples'
);

return NextResponse.json(response);
}
46 changes: 23 additions & 23 deletions src/app/api/person-image/route.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import client from '../../../../lib/appwrite_client';
import { Storage } from 'appwrite';
import { NextRequest, NextResponse } from 'next/server';

const storage = new Storage(client);

export async function GET(request: NextRequest) {
const searchParams = request.nextUrl.searchParams;
const queryParam = searchParams.get('name');

const imageResponse = await storage.getFilePreview(
process.env.APPWRITE_STORAGE_BUCKET_ID as string,
queryParam as string
);

const image = await fetch(imageResponse.href, { cache: 'no-store' });
const blob = await image.blob();

const headers = new Headers();
headers.set('Content-Type', 'image/*');

return new NextResponse(blob, { status: 200, statusText: 'OK', headers });
}
import client from '../../../../lib/appwrite_client';
import { Storage } from 'appwrite';
import { NextRequest, NextResponse } from 'next/server';

const storage = new Storage(client);

export async function GET(request: NextRequest) {
const searchParams = request.nextUrl.searchParams;
const queryParam = searchParams.get('name');

const imageResponse = await storage.getFilePreview(
process.env.APPWRITE_STORAGE_BUCKET_ID as string,
queryParam as string
);

const image = await fetch(imageResponse.href, { cache: 'no-store' });
const blob = await image.blob();

const headers = new Headers();
headers.set('Content-Type', 'image/*');

return new NextResponse(blob, { status: 200, statusText: 'OK', headers });
}
24 changes: 12 additions & 12 deletions src/app/react-query-provider.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use client';

import React from 'react';
import { QueryClientProvider, QueryClient } from '@tanstack/react-query';

export default function ReactQueryProvider({
children,
}: React.PropsWithChildren) {
const [client] = React.useState(new QueryClient());

return <QueryClientProvider client={client}>{children}</QueryClientProvider>;
}
'use client';

import React from 'react';
import { QueryClientProvider, QueryClient } from '@tanstack/react-query';

export default function ReactQueryProvider({
children,
}: React.PropsWithChildren) {
const [client] = React.useState(new QueryClient());

return <QueryClientProvider client={client}>{children}</QueryClientProvider>;
}

0 comments on commit be3428d

Please sign in to comment.