fix(api): add a migration script to rename *arr tags with spaces (#1946)

* fix(api): add a migration script to rename *arr tags with spaces

This PR adds a migration script that will run at the startup of the app to remove the spaces from
the *arr tags of Jellyseerr.

fix #1897
re #1913
re https://github.com/Radarr/Radarr/issues/11251

* fix: add error message to logs
This commit is contained in:
Gauthier
2025-10-01 11:42:10 +02:00
committed by GitHub
parent 872fc4581e
commit f2bd0abcd8
3 changed files with 122 additions and 0 deletions

View File

@@ -198,6 +198,25 @@ class ServarrBase<QueueItemAppendT> extends ExternalAPI {
}
};
public renameTag = async ({
id,
label,
}: {
id: number;
label: string;
}): Promise<Tag> => {
try {
const response = await this.axios.put<Tag>(`/tag/${id}`, {
id,
label,
});
return response.data;
} catch (e) {
throw new Error(`[${this.apiName}] Failed to rename tag: ${e.message}`);
}
};
async refreshMonitoredDownloads(): Promise<void> {
await this.runCommand('RefreshMonitoredDownloads', {});
}