Revert "Added a fix for api's with spaces in their names"

This reverts commit 98e96b15c7.
This commit is contained in:
ltctceplrm 2025-03-05 21:47:18 +01:00
parent 98e96b15c7
commit af6009f1ac

View file

@ -19,9 +19,8 @@ export abstract class APIModel {
abstract getById(id: string): Promise<MediaTypeModel>;
hasType(type: MediaType): boolean {
const sanitizedApiName = this.apiName.replace(/\s+/g, '_');
const disabledMediaTypes = (this.plugin.settings[`${sanitizedApiName}_disabledMediaTypes` as keyof typeof this.plugin.settings] as MediaType[]) || [];
return (this.types || []).includes(type) && !disabledMediaTypes.includes(type);
const disabledMediaTypes = this.plugin.settings[`${this.apiName}_disabledMediaTypes` as keyof typeof this.plugin.settings] as MediaType[];
return this.types.includes(type) && !disabledMediaTypes.includes(type);
}
hasTypeOverlap(types: MediaType[]): boolean {