File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
eFormAPI/eFormAPI/Controllers Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,35 @@ public OperationDataResult<EntityGroup> GetEntityGroup(string entityGroupUid)
127127 }
128128 }
129129
130+ [ HttpGet ]
131+ [ AllowAnonymous ]
132+ [ Route ( "api/selectable-groups/get/{entityGroupUid}/token={token}" ) ]
133+ public OperationDataResult < EntityGroup > GetEntityGroupExternally ( string entityGroupUid , string token )
134+ {
135+ // Do some validation of the token. For now token is not valid
136+ bool tokenIsValid = false ;
137+ if ( tokenIsValid )
138+ {
139+ try
140+ {
141+ var core = _coreHelper . GetCore ( ) ;
142+
143+ var entityGroup = core . EntityGroupRead ( entityGroupUid ) ;
144+
145+ return new OperationDataResult < EntityGroup > ( true , entityGroup ) ;
146+ }
147+ catch ( Exception )
148+ {
149+ return new OperationDataResult < EntityGroup > ( false ,
150+ LocaleHelper . GetString ( "ErrorWhileObtainSelectableList" ) ) ;
151+ }
152+ } else
153+ {
154+ return new OperationDataResult < EntityGroup > ( false ,
155+ LocaleHelper . GetString ( "ErrorWhileObtainSelectableList" ) ) ;
156+ }
157+ }
158+
130159 [ HttpGet ]
131160 [ Route ( "api/selectable-groups/dict/{entityGroupUid}" ) ]
132161 public OperationDataResult < List < CommonDictionaryTextModel > > GetEntityGroupDictionary ( string entityGroupUid )
You can’t perform that action at this time.
0 commit comments