Skip to content

Commit

Permalink
Count commits correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
rmunn committed Dec 6, 2024
1 parent c934db3 commit e81d560
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/FwHeadless/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static async Task<Results<Ok<ProjectSyncStatus>, NotFound>> GetMergeStatus(
var commitsOnServer = await lexBoxDb.Set<ServerCommit>().CountAsync(c => c.ProjectId == projectId);
var lcmCrdtDbContext = services.GetRequiredService<LcmCrdtDbContext>(); // TODO: This *cannot* be right, can it?
var localCommits = await lcmCrdtDbContext.Set<Commit>().CountAsync();
return TypedResults.Ok(ProjectSyncStatus.ReadyToSync(localCommits - commitsOnServer));
return TypedResults.Ok(ProjectSyncStatus.ReadyToSync(commitsOnServer - localCommits));
}

static async Task<FwDataMiniLcmApi> SetupFwData(FwDataProject fwDataProject,
Expand Down

0 comments on commit e81d560

Please sign in to comment.