ready for deployment
This commit is contained in:
committed by
Stieber Daniel (CSC FI SPS MESLEO)
parent
6aad8036e5
commit
550f376a0b
@ -62,24 +62,80 @@ API reactItems.HEAD
|
||||
API reactItems.GET
|
||||
|
||||
QueryFields = HTTP_Services('GetHTTPGetString')
|
||||
If Index(QueryFields, 'riType', 1) then
|
||||
RIType = HTTP_Services('GetQueryField', 'riType')
|
||||
If IndexC(QueryFields, 'includeNullRetireDt', 1) then
|
||||
IncludeNullRetireDt = HTTP_Services('GetQueryField', 'includeNullRetireDt')
|
||||
Begin Case
|
||||
Case ( (IncludeNullRetireDt EQ 1) or (IncludeNullRetireDt EQ 0) )
|
||||
Null
|
||||
Case ( (IncludeNullRetireDt _EQC 'true') or (IncludeNullRetireDt _EQC 'yes') )
|
||||
IncludeNullRetireDt = True$
|
||||
Case ( (IncludeNullRetireDt _EQC 'false') or (IncludeNullRetireDt _EQC 'no') )
|
||||
IncludeNullRetireDt = False$
|
||||
Case Otherwise$
|
||||
Error_Services('Add', 'Error in ':CurrentAPI:' API. Invalid value "':IncludeNullRetireDt:'" passed in for includeNullRetireDt.')
|
||||
End Case
|
||||
end else
|
||||
RIType = ''
|
||||
IncludeNullRetireDt = ''
|
||||
end
|
||||
|
||||
If Error_Services('NoError') then
|
||||
If IndexC(QueryFields, 'showAllDetails', 1) then
|
||||
ShowAllDetails = HTTP_Services('GetQueryField', 'showAllDetails')
|
||||
Begin Case
|
||||
Case ( (ShowAllDetails EQ 1) or (ShowAllDetails EQ 0) )
|
||||
Null
|
||||
Case ( (ShowAllDetails _EQC 'true') or (ShowAllDetails _EQC 'yes') )
|
||||
ShowAllDetails = True$
|
||||
Case ( (ShowAllDetails _EQC 'false') or (ShowAllDetails _EQC 'no') )
|
||||
ShowAllDetails = False$
|
||||
Case Otherwise$
|
||||
Error_Services('Add', 'Error in ':CurrentAPI:' API. Invalid value "':ShowAllDetails:'" passed in for showAllDetails.')
|
||||
End Case
|
||||
end else
|
||||
ShowAllDetails = False$
|
||||
end
|
||||
|
||||
If Error_Services('NoError') then
|
||||
If IndexC(QueryFields, 'currStatus', 1) then
|
||||
CurrStatus = HTTP_Services('GetQueryField', 'currStatus')
|
||||
end else
|
||||
CurrStatus = ''
|
||||
end
|
||||
If IndexC(QueryFields, 'riType', 1) then
|
||||
RIType = HTTP_Services('GetQueryField', 'riType')
|
||||
end else
|
||||
RIType = ''
|
||||
end
|
||||
If IndexC(QueryFields, 'entryDtStart', 1) then
|
||||
EntryDtStart = HTTP_Services('GetQueryField', 'entryDtStart')
|
||||
end else
|
||||
EntryDtStart = ''
|
||||
end
|
||||
If IndexC(QueryFields, 'entryDtEnd', 1) then
|
||||
EntryDtEnd = HTTP_Services('GetQueryField', 'entryDtEnd')
|
||||
end else
|
||||
EntryDtEnd = ''
|
||||
end
|
||||
If IndexC(QueryFields, 'retireDtStart', 1) then
|
||||
RetireDtStart = HTTP_Services('GetQueryField', 'retireDtStart')
|
||||
end else
|
||||
RetireDtStart = ''
|
||||
end
|
||||
If IndexC(QueryFields, 'retireDtEnd', 1) then
|
||||
RetireDtEnd = HTTP_Services('GetQueryField', 'retireDtEnd')
|
||||
end else
|
||||
RetireDtEnd = ''
|
||||
end
|
||||
|
||||
StatusCode = 200
|
||||
GoSub CreateHALCollection
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 400, Error_Services("GetMessage"))
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 400, Error_Services("GetMessage"))
|
||||
end
|
||||
If Index(QueryFields, 'currStatus', 1 ) then
|
||||
CurrStatus = Http_Services('GetQueryField', 'currStatus')
|
||||
end else
|
||||
CurrStatus = ''
|
||||
end
|
||||
If Index(QueryFields, 'showAllDetails', 1 ) then
|
||||
ShowAllDetails = Http_Services('GetQueryField', 'showAllDetails')
|
||||
end else
|
||||
ShowAllDetails = False$
|
||||
end
|
||||
StatusCode = 200
|
||||
|
||||
GoSub CreateHALCollection
|
||||
|
||||
end api
|
||||
|
||||
|
||||
@ -254,11 +310,7 @@ CreateHALCollection:
|
||||
|
||||
JSONCollection = ''
|
||||
Abort = False$
|
||||
If RIType NE '' OR CurrStatus NE '' then
|
||||
ReactItems = React_Item_Services('GetReactItems', RIType, CurrStatus)
|
||||
end else
|
||||
ReactItems = React_Item_Services('GetAllReactItemKeys')
|
||||
end
|
||||
ReactItems = React_Item_Services('GetReactItems', RIType, CurrStatus, EntryDtStart, EntryDtEnd, RetireDtStart, RetireDtEnd, IncludeNullRetireDt)
|
||||
|
||||
If ReactItems NE '' then
|
||||
If SRP_JSON(hJSONCollection, 'New', 'Object') then
|
||||
@ -304,3 +356,4 @@ CreateHALCollection:
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
|
Reference in New Issue
Block a user