@@ -258,8 +258,9 @@ def getTemplates(self, request, slug=None):
258258 # When listing, do not show pages and app
259259 app_template_dict = app_template .dict ()
260260 app_template_dict .pop ('pages' )
261- app_template_dict .pop ('app' )
262- json_data .append (app_template_dict )
261+ app = app_template_dict .pop ('app' )
262+ json_data .append (
263+ {** app_template_dict , ** {"app" : {"type_slug" : app ["type_slug" ]}}})
263264
264265 return DRFResponse (json_data )
265266
@@ -515,10 +516,11 @@ async def run_app_internal_async(self, uid, session_id, request_uuid, request, p
515516 def run_app_internal (self , uid , session_id , request_uuid , request , platform = None , preview = False ):
516517 app = get_object_or_404 (App , uuid = uuid .UUID (uid ))
517518 app_owner = get_object_or_404 (Profile , user = app .owner )
518-
519+
519520 if (flag_enabled ('HAS_EXCEEDED_MONTHLY_PROCESSOR_RUN_QUOTA' , request = request , user = app .owner )):
520- raise Exception ('You have exceeded your monthly processor run quota. Please upgrade your plan to continue using the platform.' )
521-
521+ raise Exception (
522+ 'You have exceeded your monthly processor run quota. Please upgrade your plan to continue using the platform.' )
523+
522524 app_data_obj = AppData .objects .filter (
523525 app_uuid = app .uuid , is_draft = preview ).order_by ('-created_at' ).first ()
524526
@@ -552,16 +554,15 @@ def run_discord(self, request, uid):
552554 @action (detail = True , methods = ['post' ])
553555 def run_slack (self , request , uid ):
554556 return self .run (request , uid , platform = 'slack' )
555-
557+
556558 @action (detail = True , methods = ['post' ])
557559 def run_twiliosms (self , request , uid ):
558560 result = self .run (request , uid , platform = 'twilio-sms' )
559561 return DRFResponse (status = 204 , headers = {'Content-Type' : 'text/xml' })
560-
562+
561563 @action (detail = True , methods = ['post' ])
562564 def run_twiliovoice (self , request , uid ):
563565 raise NotImplementedError ()
564-
565566
566567 def testsets (self , request , uid ):
567568 app = get_object_or_404 (App , uuid = uuid .UUID (uid ))
0 commit comments