pre cutover push
This commit is contained in:
@ -24,6 +24,7 @@ Compile function React_Item_Services(@Service, @Params)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$Insert LOGICAL
|
||||
$Insert APP_INSERTS
|
||||
$Insert RLIST_EQUATES
|
||||
$Insert REACT_ITEM_EQUATES
|
||||
|
||||
@ -73,9 +74,9 @@ End Service
|
||||
Service ConvertRecordToJSON(KeyID, Record, ItemURL)
|
||||
|
||||
jsonRecord = ''
|
||||
|
||||
|
||||
If KeyID NE '' then
|
||||
|
||||
|
||||
If Record EQ '' then Record = Database_Services('ReadDataRow', 'REACT_ITEM', KeyID)
|
||||
If Error_Services('NoError') then
|
||||
@DICT = Database_Services('GetTableHandle', 'DICT.REACT_ITEM')
|
||||
@ -125,7 +126,7 @@ Service ConvertRecordToJSON(KeyID, Record, ItemURL)
|
||||
SRP_JSON(objJSON, 'Set', '_links', objLinks)
|
||||
SRP_JSON(objLinks, 'Release')
|
||||
end
|
||||
|
||||
|
||||
// Create the _class property for this resource.
|
||||
SRP_JSON(objJSON, 'SetValue', '_class', 'resource')
|
||||
end
|
||||
@ -138,7 +139,7 @@ Service ConvertRecordToJSON(KeyID, Record, ItemURL)
|
||||
end else
|
||||
Error_Services('Add', 'KeyID argument was missing in the ' : Service : ' service.')
|
||||
end
|
||||
|
||||
|
||||
Response = jsonRecord
|
||||
|
||||
|
||||
@ -189,7 +190,7 @@ end service
|
||||
Service GetReactItemTemplateJSON()
|
||||
|
||||
jsonRecord = ''
|
||||
|
||||
|
||||
If SRP_JSON(objJSON, 'New', 'Object') then
|
||||
|
||||
If SRP_JSON(objReactItem, 'New', 'Object') then
|
||||
@ -303,13 +304,13 @@ Service GetReactItemTemplateJSON()
|
||||
SRP_JSON(objJSON, 'Set', 'reactItem', objReactItem)
|
||||
SRP_JSON(objReactItem, 'Release')
|
||||
end
|
||||
|
||||
|
||||
jsonRecord = SRP_JSON(objJSON, 'Stringify', 'Styled')
|
||||
SRP_JSON(objJSON, 'Release')
|
||||
end else
|
||||
Error_Services('Add', 'Unable to create JSON representation in the ' : Service : ' service.')
|
||||
end
|
||||
|
||||
|
||||
Response = jsonRecord
|
||||
|
||||
|
||||
@ -317,13 +318,25 @@ end service
|
||||
|
||||
|
||||
Service CreateReactItem(Record)
|
||||
|
||||
KeyID = ''
|
||||
ErrMsg = ''
|
||||
KeyID = ''
|
||||
If Record NE '' then
|
||||
KeyID = NextKey('REACT_ITEM')
|
||||
If Error_Services('NoError') and KeyID NE '' then
|
||||
Database_Services('WriteDataRow', 'REACT_ITEM', KeyID, Record)
|
||||
//Need to do some parameter checks here
|
||||
ReactItemType = Record<REACT_ITEM_RI_TYPE$>
|
||||
If ReactItemType EQ '' then
|
||||
ErrMsg := 'React Item Type was blank!' : CRLF$
|
||||
end
|
||||
If ErrMsg EQ '' then
|
||||
KeyID = NextKey('REACT_ITEM')
|
||||
If Error_Services('NoError') and KeyID NE '' then
|
||||
Database_Services('WriteDataRow', 'REACT_ITEM', KeyID, Record)
|
||||
end else
|
||||
ErrMsg := 'Failed to generate a key for a new react item. ' : CRLF$
|
||||
end
|
||||
end
|
||||
end
|
||||
If ErrMsg NE '' then
|
||||
Error_Services('Add', Errmsg)
|
||||
end
|
||||
Response = KeyID
|
||||
|
||||
|
Reference in New Issue
Block a user