mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-16 15:23:29 +00:00
refactor(integrations): collapse the remaining duplication and drop a dead column
Derive the recovery source rank from the one priority ladder instead of a second hand-kept map, re-point the WHOOP and Fitbit HTTP classifiers at the shared status classifier, and lift the near-identical poll-cohort job handlers onto one factory. Drop the Polar refresh-token column, which was only ever written null since Polar tokens do not expire. Behaviour is unchanged across the recovery, classifier, queue and route suites.
This commit is contained in:
commit
812b217470
13 files changed
+231
-410
No files matched your search
@@ -94,8 +94,7 @@ export const GET = apiHandler(async (request: NextRequest) => {
|
||||
where: { id: userId },
|
||||
data: {
|
||||
polarAccessTokenEncrypted: encrypt(tokens.access_token),
|
||||
// Polar issues no refresh token; the column stays null.
|
||||
polarRefreshTokenEncrypted: null,
|
||||
// Polar issues no refresh token, so no refresh column is stored.
|
||||
polarUserIdEncrypted: encrypt(polarUserId),
|
||||
},
|
||||
});
|
||||
|
||||
@@ -36,7 +36,6 @@ export const POST = apiHandler(async () => {
|
||||
where: { id: user.id },
|
||||
data: {
|
||||
polarAccessTokenEncrypted: null,
|
||||
polarRefreshTokenEncrypted: null,
|
||||
polarUserIdEncrypted: null,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user