Skip to content
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.

Commit

Permalink
Hata düzeltmeleri
Browse files Browse the repository at this point in the history
  • Loading branch information
ayberktandogan committed Nov 20, 2019
1 parent 7b044fd commit 632356b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 13 deletions.
20 changes: 19 additions & 1 deletion package-lock.json

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

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,8 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"foreman": "^3.0.1"
}
}
2 changes: 2 additions & 0 deletions public/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig><msapplication><tile><square70x70logo src="/ms-icon-70x70.png"/><square150x150logo src="/ms-icon-150x150.png"/><square310x310logo src="/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig>
17 changes: 5 additions & 12 deletions src/pages/manga/olustur.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,35 +59,28 @@ export default function MangaCreate() {
}
}

let turler = [], studyolar = []
let turler = [], yazarlar = []
manga.data.genres.forEach(genre => turler.push(genre.name))
manga.data.studios.forEach(studio => studyolar.push(studio.name))
const date = new Date(manga.data.aired.from)
manga.data.authors.forEach(authors => yazarlar.push(authors.name.replace(',', '')))
const date = new Date(manga.data.published.from)
const newMangaData = {
cover_art: manga.data.image_url,
name: manga.data.title,
release_date: date,
studios: studyolar.join(','),
authors: yazarlar.join(','),
genres: turler.join(','),
premiered: manga.data.premiered,
episode_count: manga.data.airing ? 0 : manga.data.episodes
}

const header = await axios.get(`/header-getir/${generalSlugify(manga.data.title)}`).catch(_ => _)
const synopsis = await axios.post('/ta-konu-getir/', { name: manga.data.title }).catch(_ => _)

if (header.status === 200) {
newMangaData.header = header.data.header
}
else {
newMangaData.header = ""
}
if (synopsis.status === 200) {
newMangaData.synopsis = synopsis.data.konu
newMangaData.ta_link = synopsis.data.ta_link
}
else {
newMangaData.synopsis = "Eklenecek..."
}

setMangaData({ ...mangaData, ...newMangaData, mal_get: true })
}
Expand Down

0 comments on commit 632356b

Please sign in to comment.