Skip to content

Commit fbba399

Browse files
committed
Refactoring
1 parent 3e72ff6 commit fbba399

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

app/components/Client/ClientComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import iClientClient from './../../services/iClientClient';
3+
import Client from './../../services/Client';
44

55
class ClientComponent extends React.Component{
66
constructor(props) {
@@ -12,7 +12,7 @@ class ClientComponent extends React.Component{
1212
}
1313

1414
getClients() {
15-
iClientClient.getClients().then((response) => {
15+
Client.getClients().then((response) => {
1616
this.setState({clients: response.data.clients});
1717
});
1818
}

app/components/Login/LoginComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import iClientUser from './../../services/iClientUser';
3+
import User from './../../services/User';
44

55
class LoginComponent extends React.Component{
66
constructor(props, context) {
@@ -11,7 +11,7 @@ class LoginComponent extends React.Component{
1111
handleSubmit(e) {
1212
e.preventDefault();
1313

14-
iClientUser.login(
14+
User.login(
1515
this.refs.username.value,
1616
this.refs.password.value
1717
).then((response) => {

app/services/iClientClient.js renamed to app/services/Client.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import axios from 'axios';
22

33
const host = 'http://localhost:3000';
4-
const iClientClient = {
4+
const Client = {
55
getClients() {
66
let config = {
77
headers: {
@@ -12,5 +12,5 @@ const iClientClient = {
1212
}
1313
};
1414

15-
export default iClientClient;
15+
export default Client;
1616

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import axios from 'axios';
22

33
const host = 'http://localhost:3000';
4-
const iClientUser = {
4+
const User = {
55
login(username, password) {
66
let auth = {
77
username: username,
@@ -11,4 +11,4 @@ const iClientUser = {
1111
}
1212
};
1313

14-
export default iClientUser;
14+
export default User;

0 commit comments

Comments
 (0)