Skip to content

Commit fde8d4c

Browse files
committed
Use GetFrontier in 2 more places
1 parent d5ea37e commit fde8d4c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Backend.Tests/Controllers/AudioControllerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public void TestUploadAudioFile()
112112
{
113113
_ = _audioController.UploadAudioFile(_projId, _wordId, "speakerId", _file).Result;
114114

115-
var foundWord = _wordRepo.GetWord(_projId, _wordId).Result;
115+
var foundWord = _wordRepo.GetFrontier(_projId, _wordId).Result;
116116
Assert.That(foundWord?.Audio, Is.Not.Null);
117117
}
118118

Backend/Services/WordService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ public async Task<bool> RestoreFrontierWords(string projectId, List<string> word
119119
using var activity = OtelService.StartActivityWithTag(otelTagName, "updating a word in Frontier");
120120

121121
var oldWordId = word.Id; // Capture the id in case of changes.
122-
var oldWord = await _wordRepo.GetWord(word.ProjectId, oldWordId);
123-
if (oldWord is null || !await _wordRepo.IsInFrontier(word.ProjectId, oldWordId))
122+
var oldWord = await _wordRepo.GetFrontier(word.ProjectId, oldWordId);
123+
if (oldWord is null)
124124
{
125125
return null;
126126
}

0 commit comments

Comments
 (0)