aboutsummaryrefslogtreecommitdiff
path: root/backend/api/api/Controllers/FileController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'backend/api/api/Controllers/FileController.cs')
-rw-r--r--backend/api/api/Controllers/FileController.cs9
1 files changed, 3 insertions, 6 deletions
diff --git a/backend/api/api/Controllers/FileController.cs b/backend/api/api/Controllers/FileController.cs
index 9baf6294..99d98a78 100644
--- a/backend/api/api/Controllers/FileController.cs
+++ b/backend/api/api/Controllers/FileController.cs
@@ -94,9 +94,9 @@ namespace api.Controllers
return Ok(fileModel._id);
}
- [HttpGet("csvread/{hasHeader}/{fileId}/{skipRows}/{takeRows}")]
+ [HttpGet("csvread/{fileId}/{skipRows}/{takeRows}")]
[Authorize(Roles = "User,Guest")]
- public ActionResult<string> CsvRead(bool hasHeader, string fileId, int skipRows = 0, int takeRows = 10)
+ public ActionResult<string> CsvRead(string fileId, int skipRows = 0, int takeRows = 10)
{
string uploaderId = getUserId();
@@ -109,10 +109,7 @@ namespace api.Controllers
- if (hasHeader)
- return String.Join("\n", System.IO.File.ReadLines(filePath).Skip(skipRows+1).Take(takeRows));
- else
- return String.Join("\n", System.IO.File.ReadLines(filePath).Skip(skipRows).Take(takeRows));
+ return String.Join("\n", System.IO.File.ReadLines(filePath).Skip(skipRows+1).Take(takeRows));
}