brioright-mcp 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -54,7 +54,11 @@ async function call(method, path, data, overrideApiKey) {
54
54
  })
55
55
 
56
56
  try {
57
- const res = await api({ method, url: path, data })
57
+ const reqConfig = { method, url: path };
58
+ if (data !== null && data !== undefined) {
59
+ reqConfig.data = data;
60
+ }
61
+ const res = await api(reqConfig);
58
62
  return res.data.data
59
63
  } catch (err) {
60
64
  const msg = err.response?.data?.message || err.message || 'Unknown error'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brioright-mcp",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "MCP server for Brioright — lets AI assistants create and manage tasks via natural language",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -22,4 +22,4 @@
22
22
  "engines": {
23
23
  "node": ">=18.0.0"
24
24
  }
25
- }
25
+ }
package/test-axios.mjs ADDED
@@ -0,0 +1,20 @@
1
+ import axios from 'axios';
2
+
3
+ async function test() {
4
+ const api = axios.create({
5
+ baseURL: 'https://brioright.online/api',
6
+ headers: { 'X-API-Key': 'brio_9847f9c385632d4d1c888afc42c8c3906ffad22bf7713c062a2d1c6db90adadf', 'Content-Type': 'application/json' },
7
+ timeout: 10000,
8
+ });
9
+
10
+ try {
11
+ const res = await api({ method: 'GET', url: '/workspaces', data: null });
12
+ console.log("SUCCESS:");
13
+ console.log(res.data);
14
+ } catch (err) {
15
+ console.log("ERROR:");
16
+ console.log(err.response?.data || err.message);
17
+ }
18
+ }
19
+
20
+ test();
@@ -0,0 +1,20 @@
1
+ import axios from 'axios';
2
+
3
+ async function test() {
4
+ const api = axios.create({
5
+ baseURL: 'https://brioright.online/api',
6
+ headers: { 'X-API-Key': 'brio_9847f9c385632d4d1c888afc42c8c3906ffad22bf7713c062a2d1c6db90adadf', 'Content-Type': 'application/json' },
7
+ timeout: 10000,
8
+ });
9
+
10
+ try {
11
+ const res = await api({ method: 'GET', url: '/workspaces' }); // data: undefined
12
+ console.log("SUCCESS:");
13
+ console.log(res.data);
14
+ } catch (err) {
15
+ console.log("ERROR:");
16
+ console.log(err.response?.data || err.message);
17
+ }
18
+ }
19
+
20
+ test();