Skip to content

Commit 6ab98c0

Browse files
committed
Pass token to table instances too so their methods work
1 parent 215039a commit 6ab98c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/App.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ export class App {
3232
* @returns A promise that resolves to an array of tables if successful, or undefined.
3333
*/
3434
public async getTables() {
35-
const { id } = this.props;
35+
const { id, token } = this.props;
3636
const result = await this.glide.get(`/apps/${id}/tables`);
3737

3838
if (result.status !== 200) return undefined;
3939

4040
const { data: tables }: { data: IDName[] } = await result.json();
41-
return tables.map(t => this.table({ table: t.id, name: t.name, columns: {} }));
41+
return tables.map(t => this.table({ table: t.id, name: t.name, columns: {}, token }));
4242
}
4343

4444
/**

0 commit comments

Comments
 (0)