Шестая лабораторная работа. Фикс Post и Put запросов.

This commit is contained in:
abazov73 2023-05-16 01:32:23 +04:00
parent 02bc284ff1
commit 1f69a7929e
2 changed files with 2 additions and 2 deletions

Binary file not shown.

View File

@ -31,12 +31,12 @@ export default class DataService {
}
static async create(url, data) {
const response = await axios.post(this.dataUrlPrefix + url, data);
const response = await axios.post(this.dataUrlPrefix + url, data, {headers: {"Authorization": getTokenForHeader()}});
return true;
}
static async update(url, data) {
const response = await axios.put(this.dataUrlPrefix + url, data);
const response = await axios.put(this.dataUrlPrefix + url, data, {headers: {"Authorization": getTokenForHeader()}});
return true;
}