Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit c0efe02

Browse files
committed
refactor(service): move gihtub api to @services
1 parent 6be408a commit c0efe02

File tree

15 files changed

+13
-12
lines changed

15 files changed

+13
-12
lines changed

containers/AvatarAdder/logic.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import R from 'ramda'
22
import { useEffect } from 'react'
33

4-
import { buildLog, githubApi } from '@utils'
4+
import { buildLog } from '@utils'
5+
import { githubApi } from '@services'
56

67
let store = null
78

containers/CheatsheetThread/logic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import {
1111
ERR,
1212
EVENT,
1313
THREAD,
14-
githubApi,
1514
errRescue,
1615
BStore,
1716
nilOrEmpty,
1817
} from '@utils'
18+
import { githubApi } from '@services'
1919

2020
import SR71 from '@utils/async/sr71'
2121
import S from './schema'

containers/RepoEditor/logic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ import {
99
asyncErr,
1010
EVENT,
1111
ERR,
12-
githubApi,
1312
closePreviewer,
1413
BStore,
1514
errRescue,
1615
} from '@utils'
16+
import { githubApi } from '@services'
1717

1818
import SR71 from '@utils/async/sr71'
1919
import S from './schema'

containers/RepoViewer/logic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import {
1010
TYPE,
1111
EVENT,
1212
errRescue,
13-
githubApi,
1413
} from '@utils'
14+
import { githubApi } from '@services'
1515

1616
import SR71 from '@utils/async/sr71'
1717
import S from './schema'

containers/WikiThread/logic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import {
1010
TYPE,
1111
ERR,
1212
THREAD,
13-
githubApi,
1413
errRescue,
1514
BStore,
1615
nilOrEmpty,
1716
} from '@utils'
17+
import { githubApi } from '@services'
1818

1919
import SR71 from '@utils/async/sr71'
2020
import S from './schema'

utils/github_api/cheatsheet_search.js renamed to services/github_api/cheatsheet_search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { timeout } from 'promise-timeout'
2-
import { TIMEOUT_SEC, contentEndpoint } from './config'
32

3+
import { TIMEOUT_SEC, contentEndpoint } from './config'
44
import { restClient } from './client'
55

66
export const searchCheatsheeetPromise = raw => {

utils/github_api/client.js renamed to services/github_api/client.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import fetchJsonp from 'fetch-jsonp'
22
import fetch from 'isomorphic-fetch'
3-
/* import { fetch } from 'whatwg-fetch' */
4-
import { graphqlEndpoint } from './config'
5-
import { makeGithubExplore } from '../graphql_helper'
63

7-
import BStore from '../bstore'
4+
import { BStore, makeGithubExplore } from '@utils'
5+
import { graphqlEndpoint } from './config'
86

97
const token = BStore.get('github_token')
108

File renamed without changes.

utils/github_api/index.js renamed to services/github_api/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { TimeoutError } from 'promise-timeout'
2-
import { ERR } from '../constants'
2+
import { ERR } from '@utils'
33

44
import { searchRepoPromise, transformRepo } from './repo_search'
55
import { searchUserPromise, ransformUser } from './user_search'
File renamed without changes.

0 commit comments

Comments
 (0)