db fixed
ci / docker_image (push) Successful in 2m22s
ci / deploy (push) Successful in 29s

This commit is contained in:
2026-06-29 17:09:32 -05:00
parent 1b179f9d16
commit eb40444e46
10 changed files with 13 additions and 18 deletions
+3 -3
View File
@@ -64,10 +64,11 @@ export async function login(email: string, password: string): Promise<User> {
SELECT * FROM users
WHERE email = ${email};
`;
console.log('1.25: ' + Date.now());
if (typeof user.settings == 'string') {
user.settings = JSON.parse(user.settings);
}
if (user) {
if (await bcrypt.compare(password, user.passwordHash!)) {
console.log('1.5: ' + Date.now());
delete user.passwordHash;
await sql`
@@ -75,7 +76,6 @@ export async function login(email: string, password: string): Promise<User> {
SET last_sign_in = NOW()
WHERE id = ${user.id};
`;
console.log('1.75: ' + Date.now());
return user;
}
@@ -52,7 +52,7 @@
async function onSelect(file: File) {
isGenerating = true;
const resized = await resizeImage(file, 300, 300, 0.8);
const resized = await resizeImage(file, 300, 300, 0.7);
const base64 = await fileToBase64(resized);
+2 -2
View File
@@ -7,8 +7,8 @@
base: 'focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4',
variants: {
variant: {
default: 'bg-primary text-primary-foreground hover:bg-primary/90 shadow-xs',
dull_default: 'bg-dull-primary text-dull-primary-foreground hover:bg-dull-primary/90 shadow-xs',
default: 'bg-dull-primary text-dull-primary-foreground hover:bg-primary/90 shadow-xs',
// dull_default: 'bg-dull-primary text-dull-primary-foreground hover:bg-dull-primary/90 shadow-xs',
destructive:
'bg-destructive hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white shadow-xs',
outline:
+1 -1
View File
@@ -17,7 +17,7 @@ export const genDescription = command(v.string(), async (data) => {
const outputBuffer = await image
.rotate()
.resize({ fit: 'outside', height: 300, width: 300 })
.jpeg({ quality: 80 }) // adjust if needed
.jpeg({ quality: 70 }) // adjust if needed
.toBuffer();
const description = await LLMDescribe(
+1 -1
View File
@@ -33,7 +33,7 @@ export async function LLMDescribe(imageData: string) {
);
if (!res.ok) {
console.log(await res.text());
console.error(await res.text());
// process.exit(1);
}