bfg-common 1.3.46 → 1.3.47

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.
@@ -43,19 +43,17 @@ const handleErrors = (error: Ref<API_UI_I_Error>): void => {
43
43
  export const handleRequest = async (
44
44
  url: string,
45
45
  body: UI_I_RequestBody
46
- ): Promise<boolean> => {
46
+ ): Promise<void> => {
47
47
  // @ts-ignore
48
48
  const { error } = await useMyFetch<never, API_UI_I_Error>(url, {
49
+ body,
49
50
  method: 'POST',
50
51
  key: Date.now().toString(),
51
- body,
52
52
  })
53
53
 
54
54
  if (error.value && error.value.data.error_code !== 0) {
55
55
  handleErrors(error)
56
- return false
57
56
  }
58
- return true
59
57
  }
60
58
 
61
59
  export async function sendTask({
@@ -63,17 +61,12 @@ export async function sendTask({
63
61
  target,
64
62
  args,
65
63
  }: UI_I_SendTaskParams): Promise<void> {
66
- const { $store } = useNuxtApp()
67
-
68
64
  const argsToBase64 = args ? base64.encode(args) : ''
69
- const hasProcess = await handleRequest('/ui/tasks', {
65
+ await handleRequest('/ui/tasks', {
70
66
  method,
71
67
  params: {
72
68
  target,
73
69
  args: argsToBase64,
74
70
  },
75
71
  })
76
-
77
- // @ts-ignore
78
- $store.dispatch('tasks/A_SET_PROCESS', hasProcess)
79
72
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.3.46",
4
+ "version": "1.3.47",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",