|
@@ -1,7 +1,56 @@
|
|
import React, { Component } from 'react';
|
|
import React, { Component } from 'react';
|
|
import { Input } from 'antd';
|
|
import { Input } from 'antd';
|
|
-
|
|
|
|
const Search = Input.Search;
|
|
const Search = Input.Search;
|
|
|
|
+const axios = require('axios');
|
|
|
|
+
|
|
|
|
+//Выводит всех пользователей
|
|
|
|
+// axios.get('http://127.0.0.1:2000/api/users')
|
|
|
|
+// .then(function (response) {
|
|
|
|
+// // handle success
|
|
|
|
+// console.log(response.data);
|
|
|
|
+// })
|
|
|
|
+
|
|
|
|
+//Добавить пользователя
|
|
|
|
+// axios.post(`http://127.0.0.1:2000/api/users`,{
|
|
|
|
+// "name": "John",
|
|
|
|
+// "description": "dfgfdhd",
|
|
|
|
+// "login": "Johny",
|
|
|
|
+// "password": "1234567",
|
|
|
|
+// "isAdmin": "1",
|
|
|
|
+// "email": "dsgdsgdf@gmail.com",
|
|
|
|
+// "avatar": "",
|
|
|
|
+// "phone": "+380951242245"
|
|
|
|
+// })
|
|
|
|
+// .then(function (response) {
|
|
|
|
+// // handle success
|
|
|
|
+// console.log(response);
|
|
|
|
+// })
|
|
|
|
+
|
|
|
|
+//Обновление информации пользователя
|
|
|
|
+// axios.put(`http://127.0.0.1:2000/api/users`,{
|
|
|
|
+// "id": "151",
|
|
|
|
+// "name": "Joh124",
|
|
|
|
+// "description": "dfgfdhd",
|
|
|
|
+// "login": "Johny",
|
|
|
|
+// "password": "1234567",
|
|
|
|
+// "isAdmin": "1",
|
|
|
|
+// "email": "dsgdsgdf@gmail.com",
|
|
|
|
+// "avatar": "",
|
|
|
|
+// "phone": "+380951242245"
|
|
|
|
+// })
|
|
|
|
+// .then(function (response) {
|
|
|
|
+// // handle success
|
|
|
|
+// console.log(response);
|
|
|
|
+// })
|
|
|
|
+
|
|
|
|
+// axios.delete(`http://127.0.0.1:2000/api/users`, {
|
|
|
|
+// "id": "151"
|
|
|
|
+// })
|
|
|
|
+// .then(function (response) {
|
|
|
|
+// // handle success
|
|
|
|
+// console.log(response);
|
|
|
|
+// })
|
|
|
|
+
|
|
|
|
|
|
class SearchLine extends Component {
|
|
class SearchLine extends Component {
|
|
render() {
|
|
render() {
|