Skip to content

Commit 24a4451

Browse files
authored
Update REST.cls
Внес правки
1 parent ef8bd84 commit 24a4451

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

MDX2JSON/REST.cls

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,34 +137,37 @@ ClassMethod Test() As %Status
137137
/// Get all data sources including "pivot", "kpi", "worksheets","metrics"
138138
ClassMethod GetListDataSources() As %Status
139139
{
140-
set st = $$$OK
141-
142-
Set tProvider = ##class(%ZEN.Auxiliary.jsonMDXProvider).%New()
143140

144141
if $$$R("dataSource") = "pivot"
145142
{
146143
Set tSC = ##class(%DeepSee.Utils).%GetPivotListArray(.tParms,.pMetaData,.pData)
147-
Quit tSC
144+
148145
}
149146
elseif $$$R("dataSource") = "kpi"
150147
{
151148
Set tSC = ##class(%DeepSee.Utils).%GetKPIListArray(.tParms,.pMetaData,.pData)
152-
Quit tSC
149+
153150
}
154151
elseif $$$R("dataSource") = "worksheets"
155152
{
156153
Set tSC = ##class(%DeepSee.Utils).%GetWorksheetListArray(.tParms,.pMetaData,.pData)
157-
Quit tSC
154+
158155
}
159156
elseif $$$R("datasource") = "metrics"
160157
{
161158
Set tSC = ##class(%DeepSee.Utils).%GetMetricListArray(.tParms,.pMetaData,.pData)
162-
Quit tSC
159+
163160
}
161+
162+
quit:$$$ISERR(tSC) tSC
163+
164164
Set tSC = ##class(%DeepSee.REST.v1.DataServer).%CreateObjectFromArray(.pData,pMetaData,.tSourceObj)
165-
Set tSC = tProvider.%ObjectToJSON(tSourceObj)
166165

167-
return st
166+
quit:$$$ISERR(tSC) tSC
167+
168+
do tSourceObj.%ToJSON()
169+
170+
quit tSC
168171
}
169172

170173

0 commit comments

Comments
 (0)