feat: add smoke tests, agent credit ledger, and player cashback page
Introduce admin smoke-test suite with API probes, agent credit transaction history, and player cashback records; fix SmokeTestModule DI and polish admin/player UI assets. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
16
apps/api/src/shared/uploads/upload-paths.ts
Normal file
16
apps/api/src/shared/uploads/upload-paths.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { existsSync } from 'fs';
|
||||
import { resolve } from 'path';
|
||||
|
||||
export function getUploadRoot() {
|
||||
if (process.env.UPLOAD_DIR?.trim()) {
|
||||
return resolve(process.env.UPLOAD_DIR.trim());
|
||||
}
|
||||
|
||||
const candidates = [
|
||||
resolve(process.cwd(), '..', '..', 'uploads'),
|
||||
resolve(process.cwd(), 'uploads'),
|
||||
resolve(__dirname, '..', '..', 'uploads'),
|
||||
];
|
||||
|
||||
return candidates.find((p) => existsSync(p)) ?? candidates[0];
|
||||
}
|
||||
Reference in New Issue
Block a user