Skip to content

Commit 9feb26b

Browse files
authored
Merge pull request #3739 from OpenNeuroOrg/fix-cli-auth-default
fix(cli): Fix default getRepoAccess argument order
2 parents 574d1dd + 5c0cc45 commit 9feb26b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cli/src/commands/git-credential.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ interface GraphQLError {
2121
}
2222
}
2323

24-
export async function getRepoAccess(instance: string, datasetId?: string) {
24+
export async function getRepoAccess(datasetId?: string, instance?: string) {
2525
const config = getConfig(instance)
2626
const req = await fetch(`${config.url}/crn/graphql`, {
2727
method: "POST",
@@ -68,7 +68,7 @@ export async function gitCredentialAction(
6868
}
6969
if ("path" in credential && credential.path) {
7070
const datasetId = credential.path.split("/").pop()
71-
const { token } = await tokenGetter(instance, datasetId)
71+
const { token } = await tokenGetter(datasetId, instance)
7272
const output: Record<string, string> = {
7373
username: "@openneuro/cli",
7474
password: token,

0 commit comments

Comments
 (0)