Skip to content

Commit

Permalink
refactor: move gurbaninow into separate service
Browse files Browse the repository at this point in the history
  • Loading branch information
Harjot1Singh committed Jan 10, 2022
1 parent 4e4b65f commit 5260cbe
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/services/data/bookmarks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Languages from '../../helpers/languages'
import { BookmarkData } from '../../types/data'
import * as gurbaniNow from './gurbaninow'
import * as gurbaniNow from '../gurbaninow'

export const getBookmark = async ( id: string ): Promise<BookmarkData> => {
const {
Expand Down
2 changes: 1 addition & 1 deletion src/services/data/search.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Languages from '../../helpers/languages'
import { SearchData } from '../../types/data'
import * as gurbaniNow from './gurbaninow'
import * as gurbaniNow from '../gurbaninow'

export const search = async ( query: string, page = 0 ): Promise<SearchData[]> => {
const { shabads } = await gurbaniNow.search( query, page )
Expand Down
2 changes: 1 addition & 1 deletion src/services/data/shabads.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Languages from '../../helpers/languages'
import { ShabadData } from '../../types/data'
import * as gurbaniNow from './gurbaninow'
import * as gurbaniNow from '../gurbaninow'

export const getShabad = async ( id: string ): Promise<ShabadData> => {
const {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fetchJson } from '../../../helpers/fetch'
import { fetchJson } from '../../helpers/fetch'
import { BaniListResponse, BaniResponse, SearchResponse, ShabadResponse } from './types'

const API_ROOT = 'https://api.gurbaninow.com/v2'
Expand Down
File renamed without changes.

0 comments on commit 5260cbe

Please sign in to comment.