Skip to content
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

Data CSV export ve Send email endpointleri #141

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

halilturkoglucs
Copy link

Issue: #122
3 yeni endpoint ekledim, issue'da belirtildigi gibi mevcut endpointlere dokunmadim.

Bu endpointlerin dokumantasyonunu ve ornek kullanimlarini ekledim, kisaca:

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": ["halilturkoglucs@gmail.com", "halil@turkoglu.name.tr"]
}

Email'i sendgrid uzerinden free-tear'dan kurdum ve env ustunden API KEY'i almasi gerekiyor. Ornek gonderdigim dosya ekran goruntusunu ekliyorum.

image

- Mevcut bulunan modeller icin fileStream veya direkt csv dosya olarak indirme yapilabilmektedir. UTF-8 desteğinin kontrole ihtiyacı var.

Local docker-compose-local.yml eklendi:
- Kullandığım bu şekli diğer insanlara yardımcı olabilir diye eklemek istecsrb.
- ornek mailExport kullanimi READ.me'ye eklendics
docker-compose-local.yml Outdated Show resolved Hide resolved
module.exports = async function (fastifyInstance) {

fastifyInstance.get(
"/export",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bu disariya acik bir endpoint olmamali.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue'da endpoint diye belirtilmis? Ornek auth kullanan benzemesini istediginiz baska endpoint var mi kodda, ona uygun degistireyim? ya da exportYardimEtCsv.js gibi tekli bir dosya mi istiyoruz?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eger istenilen script tarzi bir seyse, asagidaki PR i olusturdum
#143

@halilturkoglucs halilturkoglucs changed the title Data CSV export and Send email Data CSV export ve Send email endpointleri Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants