Skip to content

Commit 580db85

Browse files
committed
add /rest/update/provider/expressTemplates endpoint
1 parent 2f67d0a commit 580db85

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

apps/updateserver/rest/UpdateProvider.cfc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,15 @@ component {
414414
catch(e){
415415
return {"type":"error","message":"The version #version# is not available."};
416416
}
417-
417+
}
418+
419+
remote function getExpressTemplates() httpmethod="GET" restpath="expressTemplates" {
420+
var s3 = new services.legacy.S3( variables.s3Root );
421+
var expressTemplates = s3.getExpressTemplates();
422+
loop collection=#expressTemplates# key="local.key" item="local.item"{
423+
expressTemplates[ key ] = application.coreCdnUrl & "express-templates/" & item;
424+
};
425+
return expressTemplates;
418426
}
419427

420428
remote function reset()

apps/updateserver/services/legacy/expressTemplates.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ component {
4444
var st_s3 = QueryToStruct(s3_templates, "name" );
4545
var st_local = QueryToStruct(local_templates, "name" );
4646

47-
systemOutput( express_templates, true );
47+
//systemOutput( express_templates, true );
4848

4949
loop collection="#express_templates#" key="local.major" value="local.name"{
5050
if ( !structKeyExists(st_local, name ) ){

0 commit comments

Comments
 (0)