Feature/3 add az table module #6

Merged
noahspannbauer merged 5 commits from feature/3-add-az-table-module into main 2024-08-11 20:03:01 -04:00
3 changed files with 3 additions and 4 deletions
Showing only changes of commit db96953443 - Show all commits

View File

@@ -1,5 +1,4 @@
export interface TableOptions {
accountName: string;
accountKey: string;
tableName: string;
}

View File

@@ -10,9 +10,9 @@ export class TableService {
private tablesOptions: TableOptions
) {}
async getTableClient(): Promise<TableClient> {
async getTableClient(tableName: string): Promise<TableClient> {
const credential: AzureNamedKeyCredential = new AzureNamedKeyCredential(this.tablesOptions.accountName, this.tablesOptions.accountKey);
const tableClient: TableClient = new TableClient(`https://${this.tablesOptions.accountName}`, this.tablesOptions.tableName, credential);
const tableClient: TableClient = new TableClient(`https://${this.tablesOptions.accountName}.table.core.windows.net`, tableName, credential);
return tableClient;
}

View File

@@ -1,6 +1,6 @@
{
"name": "@noahspan/noahspan-modules",
"version": "0.3.7",
"version": "0.3.8",
"description": "",
"author": "",
"license": "UNLICENSED",