braid-text 0.2.8 → 0.2.9
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 +1 -2
- package/package.json +1 -1
- package/test.html +5 -18
package/index.js
CHANGED
|
@@ -207,8 +207,7 @@ braid_text.serve = async (req, res, options = {}) => {
|
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
braid_text.delete = async (key) => {
|
|
210
|
-
|
|
211
|
-
await resource.delete_me()
|
|
210
|
+
await braid_text.put(key, {body: ''})
|
|
212
211
|
}
|
|
213
212
|
|
|
214
213
|
braid_text.get = async (key, options) => {
|
package/package.json
CHANGED
package/test.html
CHANGED
|
@@ -110,31 +110,18 @@ runTest(
|
|
|
110
110
|
async () => {
|
|
111
111
|
let key = 'test-' + Math.random().toString(36).slice(2)
|
|
112
112
|
|
|
113
|
-
let r0 = (await (await fetch(`/test.html?check=/${key}`)).json()).result
|
|
114
|
-
|
|
115
113
|
await fetch(`/${key}`, {
|
|
116
114
|
method: 'PUT',
|
|
117
|
-
body:
|
|
118
|
-
})
|
|
119
|
-
|
|
120
|
-
let r1 = (await (await fetch(`/test.html?check=/${key}`)).json()).result
|
|
121
|
-
|
|
122
|
-
await fetch(`/${key}`, {
|
|
123
|
-
method: 'DELETE'
|
|
115
|
+
body: 'hi'
|
|
124
116
|
})
|
|
125
117
|
|
|
126
|
-
|
|
118
|
+
await fetch(`/${key}`, {method: 'DELETE'})
|
|
127
119
|
|
|
128
|
-
await fetch(`/${key}
|
|
129
|
-
method: 'PUT',
|
|
130
|
-
body: JSON.stringify({a: 5, b: 7}, null, 4)
|
|
131
|
-
})
|
|
132
|
-
|
|
133
|
-
let r3 = (await (await fetch(`/test.html?check=/${key}`)).json()).result
|
|
120
|
+
let r = await fetch(`/${key}`)
|
|
134
121
|
|
|
135
|
-
return
|
|
122
|
+
return await r.text()
|
|
136
123
|
},
|
|
137
|
-
|
|
124
|
+
''
|
|
138
125
|
)
|
|
139
126
|
|
|
140
127
|
runTest(
|