Skip to content

Commit

Permalink
Merge pull request #30 from seesharprun/main
Browse files Browse the repository at this point in the history
Fix syntax issues
  • Loading branch information
seesharprun authored Oct 23, 2024
2 parents c62f9a3 + 5f0006d commit b53a493
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/js/cosmos.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export async function start(emit) {
aadCredentials: credential
});
// </create_client>
emit('Current Status:\tStarting...')
emit('Current Status:\tStarting...');

const database = client.database('cosmicworks');

Expand Down Expand Up @@ -92,4 +92,6 @@ export async function start(emit) {
}
emit(`Request charge:\t${response.requestCharge}`);
}

emit('Current Status:\tFinalizing...');
}
8 changes: 4 additions & 4 deletions src/ts/cosmos.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DefaultAzureCredential } from '@azure/identity';
import { Container, CosmosClient, Database, FeedResponse, ItemResponse, Resource, SqlQuerySpec } from '@azure/cosmos';
import { DefaultAzureCredential, TokenCredential } from '@azure/identity';
import { Container, CosmosClient, Database, FeedResponse, ItemResponse, SqlQuerySpec } from '@azure/cosmos';

import { Emit, Product } from './types'

Expand All @@ -23,12 +23,12 @@ export class DataClient {
emit('Current Status:\tFinalizing...');
}

async createClient(emit: Emit): Promise<CosmosClient> {
async createClient(_: Emit): Promise<CosmosClient> {
// <create_client>
const endpoint: string = process.env.AZURE_COSMOS_DB_NOSQL_ENDPOINT!
console.log(`ENDPOINT: ${endpoint}`);

const credential = new DefaultAzureCredential();
const credential: TokenCredential = new DefaultAzureCredential();

const client = new CosmosClient({
endpoint,
Expand Down

0 comments on commit b53a493

Please sign in to comment.