Refactor code for improved readability and consistency
- Updated formatting in web-api.ts for better alignment and readability. - Enhanced XML builders in xml.ts for clearer structure and maintainability. - Improved test cases in s3-auth.test.ts and s3-operations.test.ts for better clarity and consistency. - Refactored mock data in web-api.test.ts for improved readability.
This commit is contained in:
+1
-4
@@ -111,10 +111,7 @@ export const softDeleteFile = async (bucketId: string, s3Key: string): Promise<b
|
||||
return result.rows.length > 0;
|
||||
};
|
||||
|
||||
export const softDeleteFilesBatch = async (
|
||||
bucketId: string,
|
||||
keys: string[],
|
||||
): Promise<number> => {
|
||||
export const softDeleteFilesBatch = async (bucketId: string, keys: string[]): Promise<number> => {
|
||||
let deleted = 0;
|
||||
for (const key of keys) {
|
||||
const ok = await softDeleteFile(bucketId, key);
|
||||
|
||||
+4
-4
@@ -12,10 +12,10 @@ export const runMigration = async (): Promise<void> => {
|
||||
// In source via bun --hot: import.meta.dir = .../src/db/
|
||||
const dir = import.meta.dir || '';
|
||||
const candidates = [
|
||||
dir + '/../../schema.sql', // from dist/
|
||||
dir + '/../schema.sql', // from src/ (bun --hot src/index.ts)
|
||||
dir + '/../schema.sql', // from src/db/ (bun --hot src/db/migrate.ts)
|
||||
dir + '/schema.sql', // from src/ (bun run db:migrate)
|
||||
dir + '/../../schema.sql', // from dist/
|
||||
dir + '/../schema.sql', // from src/ (bun --hot src/index.ts)
|
||||
dir + '/../schema.sql', // from src/db/ (bun --hot src/db/migrate.ts)
|
||||
dir + '/schema.sql', // from src/ (bun run db:migrate)
|
||||
];
|
||||
|
||||
let schemaSql: string | null = null;
|
||||
|
||||
Reference in New Issue
Block a user