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

Commit

Permalink
fix auth
Browse files Browse the repository at this point in the history
  • Loading branch information
williamhorning committed Jul 8, 2024
1 parent 01f35cb commit abaa236
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meower/api-client",
"version": "1.0.0-rc.2",
"version": "1.0.0-rc.3",
"exports": "./src/index.ts",
"fmt": {
"lineWidth": 80,
Expand Down
16 changes: 8 additions & 8 deletions src/api/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,6 @@ export class socket extends EventEmitter<{
private setup() {
this.emit('socket_open');

this.send({
'cmd': 'authpswd',
'val': {
'username': this.opts.username,
'pswd': this.opts.api_token
}
})

this.send({
'cmd': 'direct',
'val': {
Expand All @@ -74,6 +66,14 @@ export class socket extends EventEmitter<{
},
});

this.send({
'cmd': 'authpswd',
'val': {
'username': this.opts.username,
'pswd': this.opts.api_token
}
})

setInterval(() => {
if (this.socket.readyState === 1) {
this.send({
Expand Down

0 comments on commit abaa236

Please sign in to comment.