From 44f30f70d55749b9c5f0d1eaa333007c997ba06d Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Thu, 4 Aug 2022 20:58:45 +0200 Subject: [PATCH] Update authenticate command --- src/commands/Backers.ts | 4 ++-- src/constants/Extension.ts | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/commands/Backers.ts b/src/commands/Backers.ts index 55ea0168..73bb80a4 100644 --- a/src/commands/Backers.ts +++ b/src/commands/Backers.ts @@ -1,5 +1,5 @@ import { commands, ExtensionContext } from 'vscode'; -import { CONTEXT } from '../constants'; +import { COMMAND_NAME, CONTEXT } from '../constants'; import { Extension } from '../helpers'; import { Credentials } from "../services/Credentials"; import fetch from "node-fetch"; @@ -17,7 +17,7 @@ export class Backers { Backers.tryUsernameCheck(); context.subscriptions.push( - commands.registerCommand('frontMatter.authenticate', async () => { + commands.registerCommand(COMMAND_NAME.authenticate, async () => { Backers.tryUsernameCheck(); }) ); diff --git a/src/constants/Extension.ts b/src/constants/Extension.ts index ada6a795..dceb5811 100644 --- a/src/constants/Extension.ts +++ b/src/constants/Extension.ts @@ -65,4 +65,7 @@ export const COMMAND_NAME = { // Git gitSync: getCommandName("git.sync"), + + // Authenticate + authenticate: getCommandName("authenticate"), }; \ No newline at end of file