Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use admin api to get function keys #605

Merged
merged 3 commits into from
Sep 18, 2018
Merged

Use admin api to get function keys #605

merged 3 commits into from
Sep 18, 2018

Conversation

ejizba
Copy link
Member

@ejizba ejizba commented Sep 17, 2018

Fixes #567

Based on the discussion here: Azure/azure-functions-host#3411, the kudu api is deprecated and the ARM api is not ready. However, the admin api works

Relies on this PR in shared package: microsoft/vscode-azuretools#264

@ejizba ejizba requested a review from a team September 17, 2018 19:09
const triggerUrl: URL = new URL(`${this.client.defaultHostUrl}/api/${this._name}`);
const key: string | undefined = await this.getKey();
if (key) {
// tslint:disable-next-line:no-backbone-get-set-outside-model
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that you're not using backbone/, you should probably just disable this rule

const data: string = await functionsAdminRequest(this.client, urlPath);
try {
// tslint:disable-next-line:no-unsafe-any
const result: string = JSON.parse(data).value;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had more like with:

const result = JSON.parse(data).value

may depend on your tslint settings though

@ejizba ejizba merged commit 7e55c25 into master Sep 18, 2018
@ejizba ejizba deleted the ej/secrets branch September 18, 2018 16:21
@github-actions github-actions bot locked and limited conversation to collaborators Jan 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants