You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem is that PresetsService service selectPreset method is making HTTP request expecting (by default) json but actually receving text.
Solution:
Existing code:
/** * Selects the preset. * @param {SelectPresetRequest} request The request. * @return {Observable<Object>} observable The observable. */selectPreset(request: {name: string}): Observable<any>{returnthis.http.put(`${this.BASE_URL}/${PRESET_URI}`,request);}
should be:
/** * Selects the preset. * @param {SelectPresetRequest} request The request. * @return {Observable<Object>} observable The observable. */selectPreset(request: {name: string}): Observable<any>{returnthis.http.put(`${this.BASE_URL}/${PRESET_URI}`,request,{responseType: "text",});}
The other issue is when user clicks on presents page on Details button. Modal is broken when selected preset doesn't have defined variables object beside name and mocks property. variables are not mandatory not all presets will have it and it would be nice to have secured code when opening modal.
@mdasberg @Pineapples @Remco75 When user clicks on Select button of presets page, code throws error and we are having broken functionality.
Problem is that
PresetsService
serviceselectPreset
method is making HTTP request expecting (by default) json but actually receving text.Solution:
Existing code:
should be:
The other issue is when user clicks on presents page on Details button. Modal is broken when selected preset doesn't have defined
variables
object besidename
andmocks
property.variables
are not mandatory not all presets will have it and it would be nice to have secured code when opening modal.Solution:
In
PresetDetailsComponent
piece of code:could be secured liek this:
It would be really good to have those fixes in place. I would contribute with those fixes but it looks like it is impossible. Thanks in advance.
The text was updated successfully, but these errors were encountered: