* fix: ensure data dir exists before loading db
* Update src/db/db.ts
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
- Enhanced job details toggle functionality by adding event listeners to job detail elements.
- Updated job detail rows to use data attributes for better accessibility and maintainability.
- Improved the rendering of file information with unique keys for each file entry.
- Added `files_detailed` property to the `Jobs` class to store detailed file information.
- Updated job listing to include a toggle for displaying detailed file information.
- Implemented a toggle function for showing/hiding detailed file rows in the UI.
the function used here, randmInt(Min, Max) has an issue.
When running the code, I get a 500 error, with the error being
```
| const newUserId = String(randomInt(2 ** 24, Number.MAX_SAFE_INTEGER));
^
RangeError: The "max - min" is out of range. It must be <= 281474976710655. Received 9007199237963775
code: "ERR_OUT_OF_RANGE"
at randomInt (native:1:1)
at /.../ConvertX/src/index.tsx:460:32
at /.../ConvertX/src/index.tsx:594:29
at file:///.../ConvertX/node_modules/elysia/dist/bun/index.js:76:22
```
When digging deeper in the implementation, it seems that the official node doc says :
> The range (max - min) must be less than 2**48. min and max must be safe integers.
See : https://nodejs.org/api/crypto.html#cryptorandomintmin-max-callback
Feel free to close this PR and do the fix another way (it: by using a uuid instead of randomInt, etc.)