mirror of https://github.com/franjsco/tick3t
improvement: various
This commit is contained in:
parent
70a378f7cd
commit
5d42e01fcf
|
@ -11,6 +11,7 @@ import {
|
||||||
} from 'reactstrap';
|
} from 'reactstrap';
|
||||||
|
|
||||||
import { config } from '../../config';
|
import { config } from '../../config';
|
||||||
|
import { getAuthHeader } from '../../utils/auth';
|
||||||
|
|
||||||
import Card from '../../components/Card';
|
import Card from '../../components/Card';
|
||||||
import Table from '../../components/Table';
|
import Table from '../../components/Table';
|
||||||
|
@ -28,7 +29,7 @@ class TicketManager extends Component {
|
||||||
status: '',
|
status: '',
|
||||||
message: '',
|
message: '',
|
||||||
error: '',
|
error: '',
|
||||||
updateed: false,
|
updated: false,
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -101,9 +102,14 @@ class TicketManager extends Component {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const header = new Headers();
|
||||||
|
|
||||||
|
header.append('authorization', getAuthHeader());
|
||||||
|
header.append('Content-Type','application/json')
|
||||||
|
|
||||||
fetch(`${config.baseURL}tickets/${params.ticketId}`, {
|
fetch(`${config.baseURL}tickets/${params.ticketId}`, {
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: header,
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
status: this.state.status,
|
status: this.state.status,
|
||||||
note: this.state.message
|
note: this.state.message
|
||||||
|
|
Loading…
Reference in New Issue