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

Commit

Permalink
fix: change wrong field name response (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
erwindosianipar authored Nov 23, 2020
1 parent e17ccbe commit 09a1699
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
6 changes: 6 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

API Alkitab Indonesia masih dalam tahap pengembangan dan akan selalu dikembangkan untuk memperbaiki sistem API ini sendiri, berikut adalah beberapa perubahan fitur dan perbaikan-perbaikan yang dilakukan selama pengembangan API ini

## [v2.2.1](https://github.com/erwindosianipar/api-alkitab/releases/tag/v2.2.1) (23 November 2020)

### Bug Fixed (patch)

- Change wrong field name response

## [v2.2.0](https://github.com/erwindosianipar/api-alkitab/releases/tag/v2.2.0) (21 November 2020)

### Feature
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ API Alkitab Indonesia adalah sebuah *third-party backend* Alkitab yang sumber ba

## Dokumentasi

Versi saat (**v2.2.0**) telah memiliki tiga fitur utama untuk menampilkan list pasal, ayat, dan pasal Alkitab.
Versi saat (**v2.2.1**) telah memiliki tiga fitur utama untuk menampilkan list pasal, ayat, dan pasal Alkitab.

### Passage List

Expand All @@ -45,14 +45,14 @@ v2 | GET | [https://api-alkitab.herokuapp.com/v2/passage/list](https://api-alkit
{
"book_number": 1,
"abbreviation": "Kej",
"passage": "Kejadian",
"total_verse": 50
"book_name": "Kejadian",
"total_chapter": 50
},
{
"book_number": 2,
"abbreviation": "Kel",
"passage": "Keluaran",
"total_verse": 40
"book_name": "Keluaran",
"total_chapter": 40
}
]
}
Expand Down
Binary file modified bin/api-alkitab
Binary file not shown.
4 changes: 2 additions & 2 deletions list/models/list_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ package models
type PassageList struct {
BookNumber int `json:"book_number"`
Abbreviation string `json:"abbreviation"`
Passage string `json:"passage"`
TotalVerse int `json:"total_verse"`
BookName string `json:"book_name"`
TotalChapter int `json:"total_chapter"`
}
6 changes: 3 additions & 3 deletions list/repository/list_repository_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ func (u *ListRepositoryImpl) ListPassage() (*[]models.PassageList, error) {

passage.BookNumber = bookNumber
passage.Abbreviation = record[1]
passage.Passage = record[2]
passage.BookName = record[2]

totalVerse, err := strconv.Atoi(record[3])
totalChapter, err := strconv.Atoi(record[3])
if err != nil {
logrus.Info("[repository][list][ListPassage]", err)
return nil, errors.New(utils.ErrorSomethingWentWrong)
}

passage.TotalVerse = totalVerse
passage.TotalChapter = totalChapter

listPassage = append(listPassage, passage)
}
Expand Down

0 comments on commit 09a1699

Please sign in to comment.