chore: prettier format pass on branch files
Auto-format all files modified during the documents-hub-split feature branch that were not yet aligned with the project's Prettier config (single quotes, semicolons, trailing commas). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -541,10 +541,7 @@ async function fetchGroupRows(
|
||||
signedFromDocumentId: documents.id,
|
||||
})
|
||||
.from(files)
|
||||
.leftJoin(
|
||||
documents,
|
||||
and(eq(documents.signedFileId, files.id), eq(documents.portId, portId)),
|
||||
)
|
||||
.leftJoin(documents, and(eq(documents.signedFileId, files.id), eq(documents.portId, portId)))
|
||||
.where(and(eq(files.portId, portId), predicate))
|
||||
.orderBy(desc(files.createdAt))
|
||||
.limit(limit);
|
||||
|
||||
@@ -12,10 +12,7 @@ interface ScanResult {
|
||||
confidence: number;
|
||||
}
|
||||
|
||||
export async function scanReceipt(
|
||||
imageBuffer: Buffer,
|
||||
mimeType: string,
|
||||
): Promise<ScanResult> {
|
||||
export async function scanReceipt(imageBuffer: Buffer, mimeType: string): Promise<ScanResult> {
|
||||
try {
|
||||
const base64 = imageBuffer.toString('base64');
|
||||
const response = await openai.chat.completions.create({
|
||||
|
||||
@@ -7,10 +7,7 @@ import type { CreateSavedViewInput, UpdateSavedViewInput } from '@/lib/validator
|
||||
|
||||
export const savedViewsService = {
|
||||
async list(portId: string, userId: string, entityType?: string) {
|
||||
const conditions = [
|
||||
eq(savedViews.portId, portId),
|
||||
eq(savedViews.userId, userId),
|
||||
];
|
||||
const conditions = [eq(savedViews.portId, portId), eq(savedViews.userId, userId)];
|
||||
if (entityType) {
|
||||
conditions.push(eq(savedViews.entityType, entityType));
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ export function generateStorageKey(
|
||||
|
||||
export function sanitizeFilename(name: string): string {
|
||||
return name
|
||||
.replace(/[/\\:]/g, '') // strip path chars
|
||||
.replace(/\x00/g, '') // strip null bytes
|
||||
.replace(/[/\\:]/g, '') // strip path chars
|
||||
.replace(/\x00/g, '') // strip null bytes
|
||||
.replace(/[\x01-\x1f\x7f]/g, '') // strip control chars
|
||||
.trim()
|
||||
.slice(0, 255);
|
||||
|
||||
Reference in New Issue
Block a user