Skip to content

Data CSV export ve Send email endpointleri #141

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,31 @@ localhost:8080/yardimet
}
```

## export (GET)

Ilgili modelleri duz csv dosyasi olarak download eder

```
http://localhost:8080/export?veriTipi=YardimKaydi
```

## exportStream (GET)

Ilgili modelleri stream csv dosyasi olarak download eder

```
http://localhost:8080/exportStream?veriTipi=YardimKaydi
```

## mailExport (POST)

```
{
"veriTipi": "YardimKaydi",
"mailler": ["[email protected]", "[email protected]"]
}
```

## Fields alanını kullanımı

post olarak fields-{burası aalanı adı}: value şeklinde datayı gönderin onunları fields objesi altında birleştirip db ye kayddedecek
Expand All @@ -149,6 +174,18 @@ fields: {
Opsiyonel her türlü yardım isteme ve yardımEt kısmına eklenecek özellikler için
fields alanını kullanın isteidğiniz gibi json objesi post edebilirsiniz

## Local Email Saglayici Ayari

Export E-Mail ozelligi icin email saglayicinin API key degerini .env dosyasina girmeniz gerekmektedir.

Ayrica email atilmasi istediginiz hesaplari (coklu ise virgul ile ayirarak) asagidaki gibi tanimlayiniz.

e.g.
```.env
EMAIL_PROVIDER_API_KEY="EXAMPLEAPIKEY"
EXPORT_EMAILS="[email protected]"
```

## Cache i temizleme

/cache/flushall
Expand Down
2 changes: 2 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ module.exports = {
mongoUrl: process.env.MONGOURL || "",
redisUrl: process.env.REDIS_URL || "",
NODE_ENV: process.env.NODE_ENV || "development",
exportEmails: process.env.EXPORT_EMAILS || "[email protected]",
emailProviderAPIKey: process.env.EMAIL_PROVIDER_API_KEY || "",
};
71 changes: 71 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@fastify/redis": "^6.1.0",
"@fastify/swagger": "^8.3.1",
"@fastify/swagger-ui": "^1.3.0",
"@sendgrid/mail": "^7.7.0",
"@lavamoat/allow-scripts": "^2.3.0",
"@lavamoat/preinstall-always-fail": "^1.0.0",
"abstract-cache-redis": "^2.0.0",
Expand Down
Loading