public ActionResult <IEnumerable <FileReadDto> > GetAllUserFileInfo() { if (!Request.Headers.ContainsKey("token")) { return(Unauthorized()); } var auth = Request.Headers["token"]; var accountModel = _validate.GetAccountByToken(auth); if (accountModel == null) { return(Unauthorized()); } var FileItems = _repository.GetAllUserFiles(accountModel.Id); return(Ok(_mapper.Map <IEnumerable <FileReadDto> >(FileItems))); }