mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2026-01-01 04:08:45 -05:00
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:
@@ -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', {});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user