Skip to content

Commit 7599790

Browse files
authored
Update REST.cls
Changed the way arguments are passed to /:type
1 parent d7f9b4f commit 7599790

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

MDX2JSON/REST.cls

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ XData UrlMap
6666

6767
<!-- Get info about pivot-->
6868
<Route Url="/DataSource" Method="POST" Call="GetDataSource" />
69-
<Route Url="/DataSourceList" Method="POST" Call="GetListDataSources" />
69+
<Route Url="/DataSourceList/:type" Method="POST" Call="GetListDataSources" />
7070

7171
<!-- Get info about pivot-->
7272
<Route Url="/TermList" Method="POST" Call="GetTermList" />
@@ -135,25 +135,27 @@ ClassMethod Test() As %Status
135135

136136

137137
/// Get all data sources including "pivot", "kpi", "worksheets","metrics"
138-
ClassMethod GetListDataSources() As %Status
138+
ClassMethod GetListDataSources(Source) As %Status
139139
{
140140

141-
if $$$R("dataSource") = "pivot"
141+
set Source = $ZCONVERT($ZCONVERT(Source ,"I","URL") ,"I","UTF8")
142+
143+
if (Source = "pivot")
142144
{
143145
Set tSC = ##class(%DeepSee.Utils).%GetPivotListArray(.tParms,.pMetaData,.pData)
144146

145147
}
146-
elseif $$$R("dataSource") = "kpi"
148+
elseif (Source = "kpi")
147149
{
148150
Set tSC = ##class(%DeepSee.Utils).%GetKPIListArray(.tParms,.pMetaData,.pData)
149-
151+
150152
}
151-
elseif $$$R("dataSource") = "worksheets"
153+
elseif (Source = "worksheets")
152154
{
153155
Set tSC = ##class(%DeepSee.Utils).%GetWorksheetListArray(.tParms,.pMetaData,.pData)
154156

155157
}
156-
elseif $$$R("datasource") = "metrics"
158+
elseif (Source = "metrics")
157159
{
158160
Set tSC = ##class(%DeepSee.Utils).%GetMetricListArray(.tParms,.pMetaData,.pData)
159161

0 commit comments

Comments
 (0)