public async Task <IActionResult> DeleteContent([FromQuery] uint id, [FromQuery] int page) { var res = await _contentRepository.DeleteContentAsync(_userManager.GetUserId(User), id); if (!res) { return(GoMessageView("删除失败")); } return(GoMessageView("删除成功")); }
public async Task DeleteContentAsync( string path, CancellationToken cancellationToken = default) { await ContentRepository.DeleteContentAsync( path, cancellationToken); await DistributedCache.RemoveAsync( $"{CacheKeyPrefix}{path}", cancellationToken); }
public async Task <IActionResult> DeleteContent(uint cid) { var res = await _contentRepository.DeleteContentAsync(this.GetAuthorization(), cid); return(Json(res)); }