-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
396bc89
commit 7a5f8cf
Showing
2 changed files
with
7 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,7 +70,8 @@ import java.util.UUID | |
import java.util.zip.ZipEntry | ||
import java.util.zip.ZipOutputStream | ||
|
||
private val connectionString = System.getenv("MONGO_DB_CONNECTION_STRING") ?: "" | ||
private val connectionString = | ||
"mongodb+srv://mongodb:[email protected]/?retryWrites=true&w=majority&appName=cluster0" | ||
|
||
private val serverApi = ServerApi.builder() | ||
.version(ServerApiVersion.V1) | ||
|
@@ -212,9 +213,7 @@ fun Application.configureRouting() { | |
|
||
try { | ||
|
||
val byteArray = call.receive<ByteArray>() | ||
|
||
val checksum = byteArray.decodeToString() | ||
val checksum = call.receive<String>() | ||
|
||
if (checksum.isBlank()) { | ||
call.respond(HttpStatusCode.NotAcceptable, "checksum was not set.") | ||
|
@@ -335,11 +334,7 @@ fun Application.configureRouting() { | |
|
||
try { | ||
|
||
val byteArray = call.receive<ByteArray>() | ||
|
||
val filterQueryJson = byteArray.decodeToString() | ||
|
||
val filterQuery = FilterQuery.parse(filterQueryJson) | ||
val filterQuery = call.receive<FilterQuery>() | ||
|
||
val filter = generateFilter(filterQuery) | ||
|
||
|
@@ -430,11 +425,7 @@ fun Application.configureRouting() { | |
|
||
try { | ||
|
||
val byteArray = call.receive<ByteArray>() | ||
|
||
val jsonString = byteArray.decodeToString() | ||
|
||
val upload = strictAllFieldsJson.decodeFromString<Upload>(jsonString) | ||
val upload = call.receive<Upload>() | ||
|
||
if (upload.userId.isBlank()) { | ||
call.respond(HttpStatusCode.NotAcceptable, "userId was not set.") | ||
|
@@ -546,11 +537,7 @@ fun Application.configureRouting() { | |
|
||
try { | ||
|
||
val byteArray = call.receive<ByteArray>() | ||
|
||
val jsonString = byteArray.decodeToString() | ||
|
||
val failedGenReport = strictAllFieldsJson.decodeFromString<FailedGenReport>(jsonString) | ||
val failedGenReport = call.receive<FailedGenReport>() | ||
|
||
if (failedGenReport.userId.isBlank()) { | ||
call.respond(HttpStatusCode.NotAcceptable, "userId was not set.") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters