added createTag and addTagsToRoom api calls

This commit is contained in:
mushka 2022-07-25 18:14:16 +03:00
parent 5311ebff5d
commit 30d2b47fb0

View File

@ -44,7 +44,7 @@ export function createRoom(data) {
export function createRoomInThirdpary(id, data) {
const options = {
method: "post",
url: `/files/rooms/thirdparty/:${id}`,
url: `/files/rooms/thirdparty/${id}`,
data,
};
@ -110,6 +110,32 @@ export function unarchiveRoom(id, deleteAfter = true) {
});
}
export function createTag(name) {
const data = { name };
const options = {
method: "post",
url: "/files/tags",
data,
};
return request(options).then((res) => {
return res;
});
}
export function addTagsToRoom(id, tagArray) {
const data = { names: tagArray };
const options = {
method: "put",
url: `/files/rooms/${id}/tags`,
data,
};
return request(options).then((res) => {
return res;
});
}
export function getTags() {
const options = {
method: "get",