Skip to content
This repository was archived by the owner on Nov 13, 2024. It is now read-only.

Commit abaa236

Browse files
fix auth
1 parent 01f35cb commit abaa236

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@meower/api-client",
3-
"version": "1.0.0-rc.2",
3+
"version": "1.0.0-rc.3",
44
"exports": "./src/index.ts",
55
"fmt": {
66
"lineWidth": 80,

src/api/socket.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,6 @@ export class socket extends EventEmitter<{
5858
private setup() {
5959
this.emit('socket_open');
6060

61-
this.send({
62-
'cmd': 'authpswd',
63-
'val': {
64-
'username': this.opts.username,
65-
'pswd': this.opts.api_token
66-
}
67-
})
68-
6961
this.send({
7062
'cmd': 'direct',
7163
'val': {
@@ -74,6 +66,14 @@ export class socket extends EventEmitter<{
7466
},
7567
});
7668

69+
this.send({
70+
'cmd': 'authpswd',
71+
'val': {
72+
'username': this.opts.username,
73+
'pswd': this.opts.api_token
74+
}
75+
})
76+
7777
setInterval(() => {
7878
if (this.socket.readyState === 1) {
7979
this.send({

0 commit comments

Comments
 (0)