This repository was archived by the owner on May 12, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11VUE_APP_XHR_REST = https://easy-mock.com/mock/5bf3bcec941747724a67a53a/at
2- VUE_APP_KEY = development_key
3- VUE_APP_SECRET = development_secret
2+ VUE_APP_GITHUB_API = https://api.github.com
3+ VUE_APP_CLIENT_ID = development_client_id
Original file line number Diff line number Diff line change 11VUE_APP_XHR_REST = https://easy-mock.com/mock/5bf3bcec941747724a67a53a/at
2- VUE_APP_KEY = development_key
3- VUE_APP_SECRET = development_secret
2+ VUE_APP_GITHUB_API = https://api.github.com
3+ VUE_APP_CLIENT_ID = production_client_id
Original file line number Diff line number Diff line change 1+ import routes from '../routes'
2+ import createRequest from 'UTILS/request'
3+
4+ const http = createRequest ( {
5+ baseURL : process . env . VUE_APP_GITHUB_API
6+ } )
7+
8+ export function fetchCommitList ( ) {
9+ return http . get ( routes . COMMIT_LIST )
10+ }
11+
12+ export function fetchLastRelease ( ) {
13+ return http . get ( routes . LAST_RELEASE )
14+ }
Original file line number Diff line number Diff line change 11import routes from './routes'
2- import createBaseRequest from 'UTILS/request'
2+ import createRequest from 'UTILS/request'
33
4- const restBaseRequest = createBaseRequest ( process . env . VUE_APP_XHR_REST )
4+ export * from './github'
5+
6+ const http = createRequest ( {
7+ baseURL : process . env . VUE_APP_XHR_REST ,
8+ headers : {
9+ Client_Id : process . env . VUE_APP_CLIENT_ID
10+ } ,
11+ auth : true
12+ } )
513
614export function userLogin ( { username, password } ) {
7- return restBaseRequest . post ( routes . LOGIN , {
15+ return http . post ( routes . LOGIN , {
816 username,
917 password
1018 } )
1119}
1220
1321export function fetchUserAccess ( token ) {
14- return restBaseRequest . post ( routes . ACCESS , {
22+ return http . post ( routes . ACCESS , {
1523 token
1624 } )
1725}
Original file line number Diff line number Diff line change 11export default {
22 LOGIN : '/user/login' ,
3- ACCESS : '/user/access'
3+ ACCESS : '/user/access' ,
4+ COMMIT_LIST : '/repos/lbwa/adminize-template/commits' ,
5+ LAST_RELEASE : '/repos/lbwa/adminize-template/releases/latest'
46}
You can’t perform that action at this time.
0 commit comments