Browse Source

[FIX] actions

Gogs 7 years ago
parent
commit
add075c265
1 changed files with 1 additions and 13 deletions
  1. 1 13
      src/actions/index.js

+ 1 - 13
src/actions/index.js

@@ -1,6 +1,3 @@
-// import axios from 'axios'
-import { isArray } from 'lodash'
-// import { API_URL } from '../constants/ResourceNames'
 import http from '../utils/http'
 import { 
     REQUEST_START,
@@ -11,6 +8,7 @@ import {
     SHOW_NOTIFICATION, 
     HIDE_NOTIFICATION 
 } from '../constants/ActionTypes'
+import { isArray } from 'lodash'
 
 /**
  * 
@@ -34,13 +32,6 @@ export const notify = message => dispatch  => {
     })
 }
 
-/**
- * 
- */
-export const checkLogin = () => dispatch => {
-    console.log('e')
-}
-
 /**
  * 
  * @param {*} resource 
@@ -70,11 +61,9 @@ export const post = (resources, data) => async dispatch => {
     
     data = data || {}
 
-
     if (isArray(resources)) {
         for (let r of resources) {
             try {
-                // const response = await axios.post(`${API_URL}${r}`, data)
                 const response = await http.post(`${r}`, data)
                 dispatch(ok(response.data))
             } catch (error) {
@@ -83,7 +72,6 @@ export const post = (resources, data) => async dispatch => {
         }
     } else {
         try {
-            // const response = await axios.post(`${API_URL}${resources}`, data)
             const response = await http.post(`${resources}`, data)
             dispatch(ok(response.data))
         } catch (error) {