Skip to content

Commit

Permalink
update build
Browse files Browse the repository at this point in the history
  • Loading branch information
developedsoftware committed Jan 8, 2024
1 parent ec01fb2 commit ba9cf5f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,18 @@ async function snapshot() {
}

let token = readFileSync(path.resolve(__dirname, "target", ".token"), "utf8");

let systemId = (token as string).slice(0,32);

const ringApi = new RingApi({
refreshToken: token as string,
systemId: systemId as string,
systemId: 'ring-timelapse',
controlCenterDisplayName: 'ring-timelapse',
debug: false
});

ringApi.onRefreshTokenUpdated.subscribe(
async ({ newRefreshToken, oldRefreshToken }) => {
return writeFileSync(path.resolve(__dirname, "target", ".token"), newRefreshToken);
await writeFileSync(path.resolve(__dirname, "target", ".token"), newRefreshToken);
await writeFileSync(path.resolve(__dirname, "target", ".token.old"), oldRefreshToken);

Check failure on line 37 in src/snapshot.ts

View workflow job for this annotation

GitHub Actions / build (14.6)

Argument of type 'string | undefined' is not assignable to parameter of type 'string | ArrayBufferView'.
}
);

Expand Down

0 comments on commit ba9cf5f

Please sign in to comment.