public async Task <IActionResult> Delete([FromHeader] string authToken, string id) { if (!await _authenticationService.CheckAccess(authToken, "stuToolMgr")) { return(Unauthorized()); } var toolGroup = await _toolService.Get(id); if (toolGroup == null) { return(NotFound()); } await _toolService.Delete(id); await _logService.Create(new Log( null, AuthenticationHelpers.GetUserIdFromToken(authToken), DateTime.UtcNow, "Document deleted.", "toolGroups", id, null )); return(Ok()); }
public async Task Delete(string id) { await _toolService.Delete(id); }