fix(blog): add restore path for archived posts
TaxBaik CI/CD / build-and-deploy (push) Successful in 4m57s
TaxBaik CI/CD / build-and-deploy (push) Successful in 4m57s
This commit is contained in:
@@ -112,6 +112,14 @@ public class BlogServiceTests
|
||||
|
||||
public Task ArchiveAsync(int id, CancellationToken cancellationToken = default) => DeleteAsync(id, cancellationToken);
|
||||
|
||||
public Task RestoreAsync(int id, CancellationToken cancellationToken = default)
|
||||
{
|
||||
var post = Posts.FirstOrDefault(x => x.Id == id);
|
||||
if (post != null)
|
||||
post.DeletedAt = null;
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public Task IncrementViewCountAsync(int id, CancellationToken cancellationToken = default) => Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user