Skip to content

Commit

Permalink
refactor(update-addon): stop destructuring parameter for simple decla…
Browse files Browse the repository at this point in the history
…ration
  • Loading branch information
iorate committed Feb 1, 2023
1 parent dcdf40f commit b5bf675
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/update-addon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,20 @@ export type UpdateAddonParams = {
}>;
};

export async function updateAddon({
apiKey,
apiSecret,
baseURL = 'https://addons.mozilla.org/',
addonId,
addonZipPath,
channel = 'listed',
approvalNotes = null,
compatibility = ['firefox'],
releaseNotes = null,
sourceZipPath = null,
logger = console,
}: Readonly<UpdateAddonParams>): Promise<void> {
export async function updateAddon(params: Readonly<UpdateAddonParams>): Promise<void> {
const {
apiKey,
apiSecret,
baseURL = 'https://addons.mozilla.org/',
addonId,
addonZipPath,
channel = 'listed',
approvalNotes = null,
compatibility = ['firefox'],
releaseNotes = null,
sourceZipPath = null,
logger = console,
} = params;
const apiParams = { apiKey, apiSecret, baseURL };

logger.log('Uploading the add-on...');
Expand Down

0 comments on commit b5bf675

Please sign in to comment.