sidecar network host
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import { join } from 'node:path';
|
||||
import { homedir } from 'node:os';
|
||||
import type { Database } from 'bun:sqlite';
|
||||
import type { JobHandler } from '../types';
|
||||
import { registerHandler } from '../handler-registry';
|
||||
import { DATA_PATH } from '../../data-path';
|
||||
import { DATA_PATH, SERVER_CONFIG_DIR } from '../../data-path';
|
||||
import { openEmailDb, upsertFromRawEml, getSyncMeta, setSyncMeta, updateEmailLabels } from '../../api/email/email-db';
|
||||
|
||||
type GoogleCredentials = {
|
||||
@@ -14,7 +13,7 @@ type GoogleCredentials = {
|
||||
clientSecret: string;
|
||||
};
|
||||
|
||||
const googleConfigPath = join(homedir(), '.config', 'officer.dev', 'google-oauth.json');
|
||||
const googleConfigPath = join(SERVER_CONFIG_DIR, 'google-oauth.json');
|
||||
|
||||
async function loadCredentials(userId: string): Promise<GoogleCredentials> {
|
||||
const config = await Bun.file(googleConfigPath).json().catch(() => null);
|
||||
|
||||
Reference in New Issue
Block a user