Pi running inside the docker containers
This commit is contained in:
@@ -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 });
|
||||
};
|
||||
|
||||
@@ -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 };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user