Skip to content

Commit

Permalink
Merge pull request #3 from CodeClimbersIO/1-fix-vscode-plugin
Browse files Browse the repository at this point in the history
chaning codeclimbers.local to point to localhost:14400
  • Loading branch information
rphovley authored Aug 20, 2024
2 parents 55d5388 + 8232d58 commit e8fe922
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/wakatime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export class WakaTime {
if (Utils.apiKeyInvalid(defaultVal ?? undefined)) defaultVal = '';
let promptOptions = {
prompt: 'Code Climbers Api Key',
placeHolder: 'Enter your api key from http://codeclimbers.local/api-key',
placeHolder: 'Enter your api key from http://localhost:14400/api-key',
value: defaultVal!,
ignoreFocusOut: true,
password: hidden,
Expand All @@ -247,7 +247,7 @@ export class WakaTime {
},
{
key: 'api_url',
value: 'http://codeclimbers.local/api/v1',
value: 'http://localhost:14400/api/v1',
},
]
this.options.setSettings('settings', settings, false);
Expand Down Expand Up @@ -374,7 +374,7 @@ export class WakaTime {

public openDashboardWebsite(): void {
this.options.getSetting('settings', 'api_url', false, (apiUrl: Setting) => {
let url = 'http://codeclimbers.local/';
let url = 'http://localhost:14400/';
if (apiUrl.value?.trim()) {
try {
const parsedUrl = new URL(apiUrl.value);
Expand Down
10 changes: 5 additions & 5 deletions src/web/wakatime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export class WakaTime {
if (Utils.apiKeyInvalid(defaultVal)) defaultVal = '';
let promptOptions = {
prompt: 'Code Climbers Api Key',
placeHolder: 'Enter your api key from http://codeclimbers.local/api-key',
placeHolder: 'Enter your api key from http://localhost:14400/api-key',
value: defaultVal,
ignoreFocusOut: true,
password: hidden,
Expand Down Expand Up @@ -280,7 +280,7 @@ export class WakaTime {
}

public openDashboardWebsite(): void {
let url = 'http://codeclimbers.local/';
let url = 'http://localhost:14400/';
vscode.env.openExternal(vscode.Uri.parse(url));
}

Expand Down Expand Up @@ -473,7 +473,7 @@ export class WakaTime {
this.logger.debug(`Sending heartbeat: ${JSON.stringify(payload)}`);

const apiKey = this.config.get('codeclimbers.apiKey');
const url = `http://codeclimbers.local/api/v1/users/current/heartbeats?api_key=${apiKey}`;
const url = `http://localhost:14400/api/v1/users/current/heartbeats?api_key=${apiKey}`;

try {
const response = await fetch(url, {
Expand Down Expand Up @@ -539,7 +539,7 @@ export class WakaTime {
private async _getCodingActivity() {
this.logger.debug('Fetching coding activity for Today from api.');
const apiKey = this.config.get('codeclimbers.apiKey');
const url = `http://codeclimbers.local/api/v1/users/current/statusbar/today?api_key=${apiKey}`;
const url = `http://localhost:14400/api/v1/users/current/statusbar/today?api_key=${apiKey}`;
try {
const response = await fetch(url, {
method: 'GET',
Expand Down Expand Up @@ -621,7 +621,7 @@ export class WakaTime {

this.logger.debug('Fetching devs for currently focused file from api.');
const apiKey = this.config.get('codeclimbers.apiKey');
const url = `http://codeclimbers.local/api/v1/users/current/file_experts?api_key=${apiKey}`;
const url = `http://localhost:14400/api/v1/users/current/file_experts?api_key=${apiKey}`;

const payload = {
entity: file,
Expand Down

0 comments on commit e8fe922

Please sign in to comment.