Fix pairgoth import and EGF/FFG export missing flush
This commit is contained in:
@@ -27,7 +27,9 @@ class ImportServlet: HttpServlet() {
|
||||
if (json == null || !json.isObject) {
|
||||
resp.sendError(HttpServletResponse.SC_BAD_REQUEST)
|
||||
} else {
|
||||
apiResp = api.post("tour", json.asObject())
|
||||
val filtered = Json.MutableObject(json.asObject())
|
||||
filtered.remove("id")
|
||||
apiResp = api.post("tour", filtered)
|
||||
}
|
||||
}
|
||||
else { // xml ?
|
||||
@@ -55,8 +57,10 @@ class ImportServlet: HttpServlet() {
|
||||
if (example == null || !example.isObject) {
|
||||
response.sendError(HttpServletResponse.SC_BAD_REQUEST)
|
||||
} else {
|
||||
val filtered = Json.MutableObject(example.asObject())
|
||||
filtered.remove("id")
|
||||
val api = ApiTool().apply { setRequest(request) }
|
||||
val apiResp = api.post("tour", example)
|
||||
val apiResp = api.post("tour", filtered)
|
||||
if (apiResp.isObject && apiResp.asObject().getBoolean("success") == true) {
|
||||
response.contentType = "application/json; charset=UTF-8"
|
||||
response.writer.println(apiResp.toString())
|
||||
|
@@ -31,7 +31,7 @@ Create Créer
|
||||
Crit Crit
|
||||
Ctr Pays
|
||||
Dates Dates
|
||||
Delete Supprimer
|
||||
Delete Supprimer
|
||||
Download Télécharger
|
||||
Download the standalone web interface module which suits your need, then follow Télécharger le module d’interface web qui correspond à vos besoins, puis suivez
|
||||
Edit Éditer
|
||||
@@ -78,7 +78,7 @@ Nbw NbV
|
||||
New Tournament Nouveau Tournoi
|
||||
New tournament Nouveau tournoi
|
||||
Next rounds seeding Méthode rondes suivantes
|
||||
OpenGotha file Fichier OpenGotha
|
||||
OpenGotha / Pairgoth file Fichier OpenGotha / Pairgoth
|
||||
Pair Apparier
|
||||
Pair-go tournament Tournoi de pair-go
|
||||
Pairing Appariements
|
||||
|
@@ -39,8 +39,8 @@
|
||||
<form id="import-form" class="ui form">
|
||||
<div class="popup-content">
|
||||
<div class="field">
|
||||
<label>OpenGotha file</label>
|
||||
<input type="file" name="file" accept=".xml"/>
|
||||
<label>OpenGotha / Pairgoth file</label>
|
||||
<input type="file" name="file" accept=".tour,.xml"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="popup-footer">
|
||||
|
Reference in New Issue
Block a user