Skip to content

Commit

Permalink
update export @vsorras
Browse files Browse the repository at this point in the history
  • Loading branch information
Codehagen committed Jul 29, 2024
1 parent dc9d914 commit 6a5a5fe
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions apps/api/src/routes/internal/oauth/poweroffice/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
getOnboardingBody,
getOnboardingHeaders,
PO_ONBOARDING_START,
} from "@/lib/poweroffice"
} from "@/lib/poweroffice/auth"

const app = honoFactory()

Expand Down Expand Up @@ -87,7 +87,6 @@ app.post("/onboarding-finalize", async (c) => {
return c.json({ ok: true }, 200)
})


app.get("/token-test", async (c) => {
const user = c.get("user")

Expand All @@ -98,15 +97,15 @@ app.get("/token-test", async (c) => {
)
}

let token
try {
token = await getAccessToken(c.env, user.workspaceId!)
} catch (error: any) {
console.error(error)
return c.json({ ok: false, error: error}, 500)
}
let token
try {
token = await getAccessToken(c.env, user.workspaceId!)
} catch (error: any) {
console.error(error)
return c.json({ ok: false, error: error }, 500)
}

return c.json({ ok: true, user: user, message: token }, 200);
return c.json({ ok: true, user: user, message: token }, 200)
})

export const POInternalApp = app

0 comments on commit 6a5a5fe

Please sign in to comment.