Skip to content

Commit

Permalink
Use const instead of let for headers
Browse files Browse the repository at this point in the history
  • Loading branch information
graywolf336 committed Feb 1, 2023
1 parent 13d9543 commit ec9dfa8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions apps/meteor/app/apps/server/marketplace/appInstall.ts
Expand Up @@ -7,15 +7,11 @@ import { Info } from '../../../utils/server';
export type installAction = 'install' | 'update' | 'uninstall';

export async function notifyAppInstall(marketplaceBaseUrl: string, action: installAction, appInfo: IAppInfo): Promise<void> {
let headers = {
Authorization: '',
};
const headers: { Authorization?: string } = {};

try {
const token = await getWorkspaceAccessToken();
headers = {
Authorization: `Bearer ${token}`,
};
headers.Authorization = `Bearer ${token}`;

// eslint-disable-next-line no-empty
} catch {}
Expand Down

0 comments on commit ec9dfa8

Please sign in to comment.