w-web-api 1.0.14 → 1.0.15
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/dist/w-web-api.umd.js +1 -1
- package/docs/WWebApi.html +1 -1
- package/docs/WWebApi.mjs.html +1 -1
- package/docs/index.html +1 -1
- package/package.json +1 -1
- package/server/provideApis.mjs +9 -6
- package/tableTags-web-api.json +1 -1
package/dist/w-web-api.umd.js
CHANGED
package/docs/WWebApi.html
CHANGED
|
@@ -604,7 +604,7 @@
|
|
|
604
604
|
<br class="clear">
|
|
605
605
|
|
|
606
606
|
<footer>
|
|
607
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.10</a> on
|
|
607
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.10</a> on Mon Apr 18 2022 09:56:05 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
608
608
|
</footer>
|
|
609
609
|
|
|
610
610
|
<script>prettyPrint();</script>
|
package/docs/WWebApi.mjs.html
CHANGED
|
@@ -405,7 +405,7 @@ export default WWebApi
|
|
|
405
405
|
<br class="clear">
|
|
406
406
|
|
|
407
407
|
<footer>
|
|
408
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.10</a> on
|
|
408
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.10</a> on Mon Apr 18 2022 09:56:05 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
409
409
|
</footer>
|
|
410
410
|
|
|
411
411
|
<script>prettyPrint();</script>
|
package/docs/index.html
CHANGED
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
<br class="clear">
|
|
69
69
|
|
|
70
70
|
<footer>
|
|
71
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.10</a> on
|
|
71
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.10</a> on Mon Apr 18 2022 09:56:05 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
72
72
|
</footer>
|
|
73
73
|
|
|
74
74
|
<script>prettyPrint();</script>
|
package/package.json
CHANGED
package/server/provideApis.mjs
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import axios from 'axios'
|
|
2
2
|
import ltdtpick from 'wsemi/src/ltdtpick.mjs'
|
|
3
|
+
import genPm from 'wsemi/src/genPm.mjs'
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
async function provideApis(url, group, apis) {
|
|
6
7
|
//url: 指API伺服器提供的接入網址, 例如 http://localhost:11005/replaceAPIsByLevels
|
|
7
8
|
|
|
9
|
+
//pm
|
|
10
|
+
let pm = genPm()
|
|
11
|
+
|
|
8
12
|
//ks
|
|
9
13
|
let ks = [
|
|
10
14
|
'id', //'id-for-apis-pets-guineapigs-1'
|
|
@@ -36,7 +40,6 @@ async function provideApis(url, group, apis) {
|
|
|
36
40
|
// rin = JSON.stringify(rin)
|
|
37
41
|
|
|
38
42
|
//axios
|
|
39
|
-
let rout
|
|
40
43
|
await axios({
|
|
41
44
|
method: 'post',
|
|
42
45
|
url,
|
|
@@ -45,22 +48,22 @@ async function provideApis(url, group, apis) {
|
|
|
45
48
|
})
|
|
46
49
|
.then((res) => {
|
|
47
50
|
// console.log(res)
|
|
48
|
-
|
|
49
|
-
state: 'success',
|
|
51
|
+
let r = {
|
|
50
52
|
msg: '成功傳輸API清單',
|
|
51
53
|
res,
|
|
52
54
|
}
|
|
55
|
+
pm.resolve(r)
|
|
53
56
|
})
|
|
54
57
|
.catch((err) => {
|
|
55
58
|
// console.log(err)
|
|
56
|
-
|
|
57
|
-
state: 'error',
|
|
59
|
+
let r = {
|
|
58
60
|
msg: '無法傳輸API清單',
|
|
59
61
|
res: err,
|
|
60
62
|
}
|
|
63
|
+
pm.reject(r)
|
|
61
64
|
})
|
|
62
65
|
|
|
63
|
-
return
|
|
66
|
+
return pm
|
|
64
67
|
}
|
|
65
68
|
|
|
66
69
|
|
package/tableTags-web-api.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"apis":"
|
|
1
|
+
{"apis":"RnCO2r"}
|