Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions client/public/assets/locales/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@
"pause_tests": "Testleri duraklat",
"resume_tests": "Testlere devam et",
"language": "Dili değiştir",
"light_mode": "Işık modu",
"light_mode": "Aydınlık mod",
"dark_mode": "Karanlık mod",
"theme_switched_light": "Işık moduna geçildi",
"theme_switched_light": "Aydınlık moduna geçildi",
"theme_switched_dark": "Karanlık moda geçildi",
"info": "Proje hakkında bilgi",
"provider": "Sağlayıcı hakkında",
Expand Down Expand Up @@ -132,16 +132,16 @@
"configuration": "Konfigürasyon",
"stored_tests": "Saklanan testler",
"tests": "Testler",
"export_tests": "İhracat testleri",
"export_tests": "Testleri dışa aktar",
"tests_exported": "Testler dışa aktarıldı",
"csv": "CSV",
"json": "JSON",
"import_tests": "İthalat testleri",
"import_tests": "Testleri içe aktar",
"tests_imported": "Testler içe aktarıldı",
"import_test_error": "Testler içe aktarılırken bir hata oluştu",
"import_config_error": "Yapılandırma içe aktarılırken bir hata oluştu",
"export": "İhracat",
"import": "İthalat",
"export": "Dışa aktar",
"import": "İçe aktar",
"clear_history": "Geçmişi temizle",
"history_cleared": "Geçmiş temizlendi",
"delete": "Silme",
Expand Down Expand Up @@ -187,7 +187,7 @@
}
},
"time": {
"now": "Hemen şimdi",
"now": "Az önce",
"seconds": "{{seconds}} saniye",
"minute": "1 dakika",
"minutes": "{{minutes}} dakika",
Expand Down
9 changes: 7 additions & 2 deletions server/controller/recommendations.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@ module.exports.update = async (ping, download, upload) => {
const configuration = {ping: Math.round(ping), download: parseFloat(download.toFixed(2)),
upload: parseFloat(upload.toFixed(2))};

await recommendations.destroy({truncate: true});

const existing = await recommendations.findOne();
triggerEvent("recommendationsUpdated", configuration).then(() => {});

if (existing) {
await recommendations.update(configuration, {where: {id: existing.id}});
return recommendations.findOne({where: {id: existing.id}});
}

return recommendations.create(configuration);
}