Closed bobokun closed 1 month ago
Hi,
thanks for the suggestion, but I think there is no good way to implement this. See how this budget_id is generated:
...
export async function idFromFileName(name) {
let id = name.replace(/( |[^A-Za-z0-9])/g, '-') + '-' + uuidv4().slice(0, 7);
On creation, the budget id is set to a random value. That is also not stored on the budget, existing only on the metadata. Here is the server table storing the file names as reference:
-- auto-generated definition
CREATE TABLE files
(
id TEXT
PRIMARY KEY,
group_id TEXT,
sync_version SMALLINT,
encrypt_meta TEXT,
encrypt_keyid TEXT,
encrypt_salt TEXT,
encrypt_test TEXT,
deleted BOOLEAN DEFAULT FALSE,
name TEXT
);
so, while we could use the sync id (sync_id == group_id) to locate the file, we can only find the budget id after downloading the file.
Would that be enough to implement the search also for the sync id?
Yup that makes sense. I only opened this issue because I thought it was a bug after trying to enter both Budget ID and Sync ID. Also updating the details in the Basic Usage section that the README will help people understand Sync ID can be used too
Description
When passing
file="My budget"
does seem to work while using the name, however it's not easy for a user to find the file_id.budget_id
makes more sense and is easier to find for the user, could we modify to use budget ID in addition to the current options?