Add name field to the filter subscription dialog

This commit is contained in:
Ildar Kamalov 2018-10-11 12:53:15 +03:00 committed by Eugene Bujak
parent 8cf898e8d9
commit 5be66e7dc7
3 changed files with 38 additions and 19 deletions
client/src/api

View file

@ -167,10 +167,11 @@ export default class Api {
return this.makeRequest(path, method);
}
addFilter(url) {
addFilter(url, name) {
const { path, method } = this.FILTERING_ADD_FILTER;
const parameter = 'url';
const requestBody = `${parameter}=${url}`;
const urlParameter = 'url';
const nameParameter = 'name';
const requestBody = `${urlParameter}=${url}&${nameParameter}=${name}`;
const config = {
data: requestBody,
header: { 'Content-Type': 'text/plain' },