@@ -27,6 +27,11 @@ qx.Class.define("osparc.store.Templates", {
2727 __fetchTemplatesPaginated : function ( params , options ) {
2828 params [ "url" ] [ "templateType" ] = osparc . data . model . StudyUI . TEMPLATE_TYPE ;
2929 return osparc . data . Resources . fetch ( "templates" , "getPageFilteredSorted" , params , options )
30+ . then ( response => {
31+ const templates = response [ "data" ] ;
32+ templates . forEach ( template => template [ "resourceType" ] = "template" ) ;
33+ return response ;
34+ } )
3035 . catch ( err => osparc . FlashMessenger . logError ( err ) ) ;
3136 } ,
3237
@@ -42,6 +47,7 @@ qx.Class.define("osparc.store.Templates", {
4247 params [ "url" ] [ "templateType" ] = osparc . data . model . StudyUI . TUTORIAL_TYPE ;
4348 return this . __tutorialsPromiseCached = osparc . data . Resources . getInstance ( ) . getAllPages ( "templates" , params , "getPageFilteredSorted" )
4449 . then ( tutorials => {
50+ tutorials . forEach ( tutorial => tutorial [ "resourceType" ] = "tutorial" ) ;
4551 this . __tutorials = tutorials ;
4652 return tutorials ;
4753 } )
@@ -57,6 +63,7 @@ qx.Class.define("osparc.store.Templates", {
5763 params [ "url" ] [ "templateType" ] = osparc . data . model . StudyUI . HYPERTOOL_TYPE ;
5864 return this . __hypertoolsPromiseCached = osparc . data . Resources . getInstance ( ) . getAllPages ( "templates" , params , "getPageFilteredSorted" )
5965 . then ( hypertools => {
66+ hypertools . forEach ( hypertool => hypertool [ "resourceType" ] = "hypertool" ) ;
6067 this . __hypertools = hypertools ;
6168 return hypertools ;
6269 } )
0 commit comments