Pi running inside the docker containers

This commit is contained in:
2026-02-22 22:21:47 +00:00
parent 99a27e5b13
commit 09cff3f763
15 changed files with 315 additions and 26 deletions
+2
View File
@@ -4,6 +4,7 @@ import { officerdb, count, Users } from 'officerdb';
import { sign, verify } from '@@/jwt';
import argon2 from 'argon2';
import * as errors from '@@/custom-errors';
import { syncUserPiConfig } from '@@/api/server-settings/sync-user-pi-config';
import { validatePassword } from './validate-password';
export const bootstrapHandler: Handler = async function (ctx) {
@@ -59,5 +60,6 @@ export const bootstrapHandler: Handler = async function (ctx) {
}).returning();
if (!insertedUsers || insertedUsers.length === 0) throw errors.INTERNAL_SERVER_ERROR('Failed to create user');
syncUserPiConfig(payload.email).catch(() => {});
return ctx.json({ ok: true });
};
+2
View File
@@ -4,6 +4,7 @@ import { join } from 'node:path';
import { officerdb, eq, and, Users, Passkeys } from 'officerdb';
import { sign } from '@@/jwt';
import { getClaudeDir } from '@@/data-path';
import { syncUserPiConfig } from '@@/api/server-settings/sync-user-pi-config';
import argon2 from 'argon2';
import * as errors from '@@/custom-errors';
@@ -29,6 +30,7 @@ export const signinHandler: Handler = async function (ctx) {
const { id, name, role } = dbUser;
mkdir(join(getClaudeDir(email), 'archived'), { recursive: true }).catch(() => {});
syncUserPiConfig(email).catch(() => {});
const tokenUser = { id, email, name, role, passkeys: passkeys.length };