diff --git a/packages/asc-web-common/api/rooms/index.js b/packages/asc-web-common/api/rooms/index.js index 5721a9b374..ccf691e851 100644 --- a/packages/asc-web-common/api/rooms/index.js +++ b/packages/asc-web-common/api/rooms/index.js @@ -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",