Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@
var queryString = GetSearchQueryString(text, catalogueId, offset, limit, resourceTypes);

var response = await GetStringAsync($"/Resource/Search?{queryString}");
var result = JsonConvert.DeserializeObject<ResourceSearchResult>(response);

Check warning on line 64 in DigitalLearningSolutions.Data/ApiClients/LearningHubApiClient.cs

View workflow job for this annotation

GitHub Actions / Build and test

Possible null reference argument for parameter 'value' in 'ResourceSearchResult? JsonConvert.DeserializeObject<ResourceSearchResult>(string value)'.
return result;

Check warning on line 65 in DigitalLearningSolutions.Data/ApiClients/LearningHubApiClient.cs

View workflow job for this annotation

GitHub Actions / Build and test

Possible null reference return.
}

public async Task<ResourceReferenceWithResourceDetails> GetResourceByReferenceId(int resourceReferenceId)
{
var response = await GetStringAsync($"/Resource/{resourceReferenceId}");
var result = JsonConvert.DeserializeObject<ResourceReferenceWithResourceDetails>(response);

Check warning on line 71 in DigitalLearningSolutions.Data/ApiClients/LearningHubApiClient.cs

View workflow job for this annotation

GitHub Actions / Build and test

Possible null reference argument for parameter 'value' in 'ResourceReferenceWithResourceDetails? JsonConvert.DeserializeObject<ResourceReferenceWithResourceDetails>(string value)'.
return result;

Check warning on line 72 in DigitalLearningSolutions.Data/ApiClients/LearningHubApiClient.cs

View workflow job for this annotation

GitHub Actions / Build and test

Possible null reference return.
}

public async Task<BulkResourceReferences> GetBulkResourcesByReferenceIds(
Expand All @@ -82,14 +82,14 @@
var jsonString = JsonSerializer.Serialize(objectWithReferenceIds);
var response = await GetStringAsync($"/Resource/BulkJson?resourceReferences={jsonString}");

var result = JsonConvert.DeserializeObject<BulkResourceReferences>(response);

Check warning on line 85 in DigitalLearningSolutions.Data/ApiClients/LearningHubApiClient.cs

View workflow job for this annotation

GitHub Actions / Build and test

Possible null reference argument for parameter 'value' in 'BulkResourceReferences? JsonConvert.DeserializeObject<BulkResourceReferences>(string value)'.
return result;

Check warning on line 86 in DigitalLearningSolutions.Data/ApiClients/LearningHubApiClient.cs

View workflow job for this annotation

GitHub Actions / Build and test

Possible null reference return.
}

public async Task<CataloguesResult> GetCatalogues()
{
var response = await GetStringAsync("/Catalogues");
var response = await GetStringAsync("/Catalogue");
var result = JsonConvert.DeserializeObject<CataloguesResult>(response);

Check warning on line 92 in DigitalLearningSolutions.Data/ApiClients/LearningHubApiClient.cs

View workflow job for this annotation

GitHub Actions / Build and test

Possible null reference argument for parameter 'value' in 'CataloguesResult? JsonConvert.DeserializeObject<CataloguesResult>(string value)'.
return result;
}

Expand Down
Loading