Skip to content

Commit ad81e8f

Browse files
committed
Removed extraneous logs. Added message for codify edit
1 parent 3643c4a commit ad81e8f

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

src/api/dashboard/index.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1+
import { config } from '../../config.js';
12
import { LoginHelper } from '../../connect/login-helper.js';
23
import { CloudDocument } from './types.js';
34

4-
const API_BASE_URL = 'http://localhost:3000'
5-
65
export const DashboardApiClient = {
76
async getDocument(id: string): Promise<CloudDocument> {
87
const login = LoginHelper.get()?.credentials;
@@ -11,7 +10,7 @@ export const DashboardApiClient = {
1110
}
1211

1312
const res = await fetch(
14-
`${API_BASE_URL}/api/v1/documents/${id}`,
13+
`${config.dashboardUrl}/api/v1/documents/${id}`,
1514
{ method: 'GET', headers: { 'Content-Type': 'application/json', 'authorization': `Bearer ${login.accessToken}` } },
1615
);
1716

@@ -30,10 +29,8 @@ export const DashboardApiClient = {
3029
throw new Error('Not logged in');
3130
}
3231

33-
console.log('Token', login.accessToken);
34-
3532
const res = await fetch(
36-
`${API_BASE_URL}/api/v1/documents/default/id`,
33+
`${config.dashboardUrl}/api/v1/documents/default/id`,
3734
{ method: 'GET', headers: { 'Content-Type': 'application/json', 'authorization': `Bearer ${login.accessToken}` } },
3835
);
3936

src/connect/login-helper.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ export class LoginHelper {
2929
}
3030

3131
const credentials = await LoginHelper.read();
32-
33-
console.log('My credentials', credentials);
3432
if (!credentials) {
3533
LoginHelper.instance = new LoginHelper(false);
3634
return LoginHelper.instance;
@@ -70,8 +68,7 @@ export class LoginHelper {
7068
userId: decoded.sub!,
7169
expiry: decoded.exp!,
7270
}
73-
} catch(e) {
74-
console.error(e);
71+
} catch {
7572
return undefined;
7673
}
7774
}

src/orchestrators/connect.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ ${connectionSecret}`)
5050
onOpen?.(connectionSecret);
5151
});
5252

53-
// const wsManager = WsServerManager.init(server, connectionSecret)
54-
// .setDefault(defaultWsHandler)
55-
5653
SocketServer.init(server, connectionSecret);
5754
}
5855

src/orchestrators/edit.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ export class EditOrchestrator {
2525

2626
await ConnectOrchestrator.run(oclifConfig, false, (code) => {
2727
open(`${url}?connection_code=${code}`);
28+
console.log(
29+
`Opening default Codify file:
30+
${url}?connection_code=${code}
31+
32+
Starting connection. If unsuccessful, manually enter the code:
33+
${code}`)
2834
});
2935
}
3036
}

0 commit comments

Comments
 (0)