Skip to content

Commit cf9c95b

Browse files
committed
Authenticated
1 parent 88f3032 commit cf9c95b

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

packages/server/src/Env.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
export type Env = {
22
DO: DurableObjectNamespace
33
ENV_DISCRIMINATOR: string
4-
PUSHBULLET_AUTH_TOKEN: string
54
HYPERDX_API_KEY: string
65
OTEL_SERVICE_NAME: string
76
OTEL_EXPORTER_OTLP_ENDPOINT: string

packages/server/src/worker.ts

+1-18
Original file line numberDiff line numberDiff line change
@@ -242,24 +242,7 @@ class AShoppingBird {
242242
masterKey: this.env.KEEP_MASTER_KEY,
243243
})
244244

245-
console.log({ authenticated })
246-
247-
if (!authenticated) {
248-
await this.setAuthState(false)
249-
250-
await fetch("https://api.pushbullet.com/v2/pushes", {
251-
method: "POST",
252-
headers: {
253-
"Content-Type": "application/json",
254-
"Access-Token": this.env.PUSHBULLET_AUTH_TOKEN,
255-
},
256-
body: JSON.stringify({
257-
type: "note",
258-
title: "Hello Admin!",
259-
body: "You need to re-authenticate the Shopping Bird bot",
260-
}),
261-
})
262-
}
245+
await this.setAuthState(authenticated)
263246

264247
const client = new ExternalClient({
265248
bot,

0 commit comments

Comments
 (0)