Skip to content

Commit b7939b0

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 78a007a commit b7939b0

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

src/electron/frontend/core/components/DandiResults.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ export class DandiResults extends LitElement {
3838

3939
const otherElIds = ["embargo_status"];
4040

41-
const sandbox = isSandbox(this.id);
42-
const type = sandbox ? "sandbox" : undefined;
41+
const sandbox = isSandbox(this.id);
42+
const type = sandbox ? "sandbox" : undefined;
4343
const api_key = await getAPIKey.call(this, sandbox);
4444

4545
const dandiset = await get(this.id, {

src/electron/frontend/core/components/pages/uploads/UploadsPage.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,14 @@ export function createDandiset(results = {}) {
119119
throw message;
120120
});
121121

122-
const uploadToMain = form.resolved.archive === "main";
123-
const sandbox = !uploadToMain;
124-
125-
const api_key = await getAPIKey.call(this, sandbox);
126-
127-
const api = new dandi.API({
128-
token: api_key,
129-
type: sandbox ? "sandbox" : undefined,
122+
const uploadToMain = form.resolved.archive === "main";
123+
const sandbox = !uploadToMain;
124+
125+
const api_key = await getAPIKey.call(this, sandbox);
126+
127+
const api = new dandi.API({
128+
token: api_key,
129+
type: sandbox ? "sandbox" : undefined,
130130
});
131131

132132
await api.authorize();
@@ -185,15 +185,15 @@ export async function uploadToDandi(info, type = "project" in info ? "project" :
185185

186186
const dandiset_id = dandiset;
187187

188-
const sandbox = isSandbox(dandiset_id); // Automatically detect sandbox IDs
189-
190-
const api_key = await getAPIKey.call(this, sandbox);
191-
192-
const payload = {
193-
dandiset_id,
194-
...info.additional_settings,
195-
sandbox: sandbox,
196-
api_key,
188+
const sandbox = isSandbox(dandiset_id); // Automatically detect sandbox IDs
189+
190+
const api_key = await getAPIKey.call(this, sandbox);
191+
192+
const payload = {
193+
dandiset_id,
194+
...info.additional_settings,
195+
sandbox: sandbox,
196+
api_key,
197197
};
198198

199199
if (info.project) payload.project = info.project;

0 commit comments

Comments
 (0)