-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export için Scriptleri ekle #105
base: main
Are you sure you want to change the base?
Conversation
lib/Check.js
Outdated
@@ -1,29 +1,34 @@ | |||
class Check { | |||
constructor() {} | |||
constructor() {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linter ve formatter calistirmamissin sanirim. npm run lint && npm run format
calistirir misin?
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #105 +/- ##
==========================================
+ Coverage 52.52% 52.68% +0.15%
==========================================
Files 15 14 -1
Lines 1068 1063 -5
Branches 24 23 -1
==========================================
- Hits 561 560 -1
+ Misses 507 503 -4
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
npm run lint && npm run format komutlarını çalıştırdım |
"rome": "^11.0.0", | ||
"vitest": "^0.28.4" | ||
} | ||
"name": "deprem-io-backend", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bu dosyanin indentation'ini neden degistirdik
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bunu ben de anlayamadım normalde Rome kullanmıyorum ama uyumlu olması için tüm gerekli ayarları yaptım yine de sorun oluyor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
degisiklikleri eski haline alalim lutfen
routes/cacheUrls.js
Outdated
@@ -0,0 +1,23 @@ | |||
const express = require("express"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
artik express kullanmiyoruz. merge ederken yanlis merge etmissin sanirim.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ilgili dosya silindi
routes/controllers/yardim.js
Outdated
const Yardim = require("../../models/yardimModel"); | ||
const YardimKaydi = require("../../models/yardimKaydiModel"); | ||
|
||
const Yardim = require("../../models/Yardim"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dosya adlari buyuk harf olmamali.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
düzeltildi
routes/controllers/yardim.js
Outdated
const YardimKaydi = require("../../models/yardimKaydiModel"); | ||
|
||
const Yardim = require("../../models/Yardim"); | ||
const YardimKaydi = require("../../models/YardimKaydi"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dosya adlari kucuk harf olmali: models/yardim-kaydi
ornegin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
düzeltildi
utils/Database.js
Outdated
await connection; | ||
console.log("Veri tabanı bağlantısı sağlandı"); | ||
} catch (e) { | ||
console.log("Veri tabanı bağlantısında hata oluştu", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
veritabanina baglanamazsak uygulamanin butun islevi gidiyor. bu hatayi yutmamaliyiz.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
düzeltildi
|
||
const connection = new Promise(function (resolve, reject) { | ||
mongoose.connect( | ||
process.env.MONGOURL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config dosyasi kullaniyoruz. lutfen bu veriyi oradan cekelim.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dotenv modülü kullanılmıyo mu
routes/controllers/yardim.js
Outdated
@@ -29,6 +29,7 @@ module.exports = async function (fastifyInstance) { | |||
description: "Yardim listesi", | |||
}, | |||
}, | |||
// @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ts-ignore
'larin hepsi senin IDE'nden kaynaklanan sorunlari cozmek icin kullaniliyor sanirim. Typescript yazmadigimiz icin bu ignore
larin hepsini kaldiralim lutfen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tamamdır
index.js
Outdated
useNewUrlParser: true, | ||
useUnifiedTopology: true, | ||
}) | ||
Database.connect() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Database'in icersindeki console.log'lari kaldiralim. Aksi taktirde uygulama calisirken 2 sefer log yazmis oluyoruz. console.log yerine her zaman fastify.log
kullanalim.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tabi
utils/Database.js
Outdated
await connection; | ||
console.log("Veri tabanı bağlantısı sağlandı"); | ||
} catch (e) { | ||
console.error("Veri tabanı bağlantısında hata oluştu", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bu catch'i kaldir diye yorum yapmistim. duzeltildi demissin ama duzeltilmemis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
burda bağlantı başarısız olursa error verip process exit ediliyo ben yeterli bir müdahale diye kanaat getirdim
|
||
module.exports.connect = async function () { | ||
try { | ||
await connection; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bu connection nereden geliyor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aynı sayfa içerisinde benim oluşturduğum bir promise nesnesi. mongoose kütüphanesinin connect fonksiyonunu callback tarzından promise çevirdim bu connection da o promise e işaret ediyor
Main branchi pull edip exportlar ile beraber çözüp tekrar pr attım