Skip to content

Commit

Permalink
build(data): store line_type name instead of entire line_type data in…
Browse files Browse the repository at this point in the history
… JSON

Closes #1357
  • Loading branch information
Harjot1Singh committed Dec 16, 2019
1 parent f4bca05 commit 5bdec29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/build-database.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,7 @@ const importLines = async trx => {
forEach( lines, ( [ line, translations ] ) => {
const { gurmukhi, id } = line

transliterateAll( gurmukhi ).forEach( ( [ languageId, transliteration ] ) =>
transliterationData.push( {
transliterateAll( gurmukhi ).forEach( ( [ languageId, transliteration ] ) => transliterationData.push( {
line_id: id,
language_id: languageId,
transliteration,
Expand Down
3 changes: 2 additions & 1 deletion lib/build-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,11 @@ const processLines = async () => {
typeId,
shabadId,
translations,
type,
transliterations,
...line
} ) => ( {
...snakeCaseKeys( line ),
...snakeCaseKeys( { ...line, type: ( type && type.nameEnglish ) } ),
// Generate JSON for transliterations for line organissed by language: data
translations: translations.reduce( ( acc, {
translationSourceId,
Expand Down

0 comments on commit 5bdec29

Please sign in to comment.