[Refactor] (Huge Refactoring) ReceiveRoutes: change the way define endpoints, hooks and methods.

Remove 'multi language translation enable/disable' related methods that is no longer in use from quite ago.
This commit is contained in:
Sakamoto Shiina
2025-06-14 01:07:12 +09:00
parent 1fcb765ca0
commit fb2b224231
22 changed files with 510 additions and 609 deletions

View File

@@ -57,4 +57,12 @@ export const genNumArray = (count, start_from = 0) => {
export const genNumObjArray = (count, start_from = 0) => {
return arrayToObject(genNumArray(count, start_from));
};
// This is using for only AI models compute device list, currently. (CTranslate2, Whisper)
export const transformToIndexedArray = (devices) => {
return devices.reduce((result, device, index) => {
result[index] = device;
return result;
}, {});
};