in Twitter/Connector/Controllers/DataSourceSetupController.cs [101:122]
public async Task<bool> SavePage([FromBody] ConnectorEntity page, [FromUri] string jobId, [FromUri] string tenantId)
{
Expression < Func < PageJobEntity, bool>> filter = (entity => entity.RowKey == $"{jobId}");
PageJobMappingTable = azureTableProviderInstance.GetAzureTableReference(Settings.PageJobMappingTableName);
List<PageJobEntity> pageJobEntityList = await azureTableProviderInstance.QueryEntitiesAsync<PageJobEntity>(PageJobMappingTable, filter);
PageJobEntity pageJobEntity = pageJobEntityList?[0];
Trace.TraceInformation("Job Setup complete page succesfully saved for jobId: {0}", jobId);
try
{
Trace.TraceInformation("Job with JobId: {0} subscribing to webhook", jobId);
bool subscribed = await sourceProvider.Subscribe(pageJobEntity.SourceInfo);
Trace.TraceInformation("Job with JobId: {0} successfully subscribed to webhook", jobId);
}
catch (Exception e)
{
Trace.TraceInformation("Job with JobId: {0} subscribed to webhook failed with error: {1}", jobId, e.Message);
return false;
}
return true;
}