Skip to content

Commit 856a188

Browse files
committed
support extra_fields in store
1 parent 795a7d2 commit 856a188

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/api/store.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export async function submit(
99
file_hash = null, fileobject = null,
1010
storage_engine = 'storage',
1111
chain = null, channel = null, api_server = DEFAULT_SERVER,
12-
account = null } = {}) {
12+
account = null, extra_fields = {} } = {}) {
1313

1414
if ((file_hash === null) && (fileobject === null)) {
1515
throw "You must either provide a hash and an engine or a fileobject"
@@ -38,7 +38,8 @@ export async function submit(
3838
'address': address,
3939
'item_type': storage_engine,
4040
'item_hash': file_hash,
41-
'time': Date.now() / 1000
41+
'time': Date.now() / 1000,
42+
...extra_fields
4243
}
4344
let message = {
4445
'chain': chain,

0 commit comments

Comments
 (0)