Skip to content

Commit

Permalink
Fix Article ReadOn time
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisnabi committed Jun 6, 2024
1 parent 848cb75 commit 627f1ed
Show file tree
Hide file tree
Showing 19 changed files with 2 additions and 4,115 deletions.
2 changes: 1 addition & 1 deletion src/Blogger.Domain/ArticleAggregate/Article.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private static TimeSpan GetReadOnTimeSpan(string body)
return TimeSpan.Zero;
}

var words = body.Split([ ' ', '\t', '\n', '\r' ], StringSplitOptions.RemoveEmptyEntries).Length;
var words = body.Split(' ', '\t', '\n', '\r').Length;
var readingTimeMinutes = words / 200.0;
return TimeSpan.FromMinutes(readingTimeMinutes);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using Blogger.Domain.ArticleAggregate;
using Blogger.Domain.CommentAggregate;
using Blogger.Domain.SubscriberAggregate;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.EntityFrameworkCore.Design;

namespace Blogger.Infrastructure.Persistence;
public class BloggerDbContextFactory : IDesignTimeDbContextFactory<BloggerDbContext>
Expand Down
Loading

0 comments on commit 627f1ed

Please sign in to comment.