Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
solita-nhuttu committed Feb 19, 2024
1 parent 0b3b31f commit 7cd7ced
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/app/api/cosmos/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { CosmosClient } from "@azure/cosmos";
import { NextResponse } from "next/server";

const COSMOS_CONNECTION_STRING = process.env.COSMOS_CONNECTION_STRING ?? "";
const client = new CosmosClient(COSMOS_CONNECTION_STRING);
const DB_ID = "nhuttudb";
const CONT_ID = "nhuttucont";

export async function GET(request: Request) {
const client = new CosmosClient(COSMOS_CONNECTION_STRING);
const DB_ID = "nhuttudb";
const CONT_ID = "nhuttucont";
const db = await client.databases.createIfNotExists({ id: DB_ID });
const cont = await db.database.containers.createIfNotExists({ id: CONT_ID });

Expand Down
2 changes: 0 additions & 2 deletions src/app/api/file/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// pages/api/upload.js

import { BlobServiceClient, BlockBlobUploadOptions } from "@azure/storage-blob";
import { NextRequest, NextResponse } from "next/server";

Expand Down

0 comments on commit 7cd7ced

Please sign in to comment.