diff --git a/go.mod b/go.mod index 1ede1717cc7052e78b3974f20fdd297de0abc4e7..5d07ce676d09860107b751c9cbb69afac150c50b 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/spf13/cobra v1.7.0 github.com/spf13/jwalterweatherman v1.1.0 github.com/stretchr/testify v1.8.2 - gitlab.com/elixxir/client/v4 v4.6.4-0.20230602201618-11b41b04386f + gitlab.com/elixxir/client/v4 v4.6.4-0.20230602205033-94b7a8f73adf gitlab.com/elixxir/crypto v0.0.7-0.20230522162218-45433d877235 gitlab.com/elixxir/primitives v0.0.3-0.20230214180039-9a25e2d3969c gitlab.com/elixxir/wasm-utils v0.0.0-20230522231408-a43b2c1481b2 diff --git a/go.sum b/go.sum index f2b0a5afd371eb4e43bb2e49c935cf653c61c8a2..b968aff805a0a720933df60a0b6cabde0b819c3b 100644 --- a/go.sum +++ b/go.sum @@ -547,6 +547,8 @@ gitlab.com/elixxir/client/v4 v4.6.4-0.20230601191407-1b0289b33708 h1:wNIKci4XuDf gitlab.com/elixxir/client/v4 v4.6.4-0.20230601191407-1b0289b33708/go.mod h1:fegbuF1/6a+H3QgsoMG8teLnyuKtDxkELMw8pn5WlZ8= gitlab.com/elixxir/client/v4 v4.6.4-0.20230602201618-11b41b04386f h1:jwXyq/17fo5VxdQUDQiIfUHqr8m6Df1bV8wRjV4ssyw= gitlab.com/elixxir/client/v4 v4.6.4-0.20230602201618-11b41b04386f/go.mod h1:fegbuF1/6a+H3QgsoMG8teLnyuKtDxkELMw8pn5WlZ8= +gitlab.com/elixxir/client/v4 v4.6.4-0.20230602205033-94b7a8f73adf h1:n9P9trdEGTBQBhraTI800+ZTrNeahmb01uFtfuyaga0= +gitlab.com/elixxir/client/v4 v4.6.4-0.20230602205033-94b7a8f73adf/go.mod h1:fegbuF1/6a+H3QgsoMG8teLnyuKtDxkELMw8pn5WlZ8= gitlab.com/elixxir/comms v0.0.4-0.20230519211512-4a998f4b0938 h1:f27+QUFiGWrprKm+fstOg3ABkYLpWcZi3+8Lf5eDnqY= gitlab.com/elixxir/comms v0.0.4-0.20230519211512-4a998f4b0938/go.mod h1:z+qW0D9VpY5QKTd7wRlb5SK4kBNqLYsa4DXBcUXue9Q= gitlab.com/elixxir/crypto v0.0.7-0.20230522162218-45433d877235 h1:0BySdXTzRWxzH8k5RiNNMmmn2lpuQWLVcDDA/7ehyqc= diff --git a/wasm/collective.go b/wasm/collective.go index 5bd0fa145fd214752475bc1eaa9601dc881297e5..c6ee44fd5a93b9409984b6d9454911eefa3857f1 100644 --- a/wasm/collective.go +++ b/wasm/collective.go @@ -516,13 +516,13 @@ func (rsCB *RemoteStore) Write(path string, data []byte) error { // Returns: // - JSON of [bindings.RemoteStoreReport] (Uint8Array). // - Catches any thrown errors (of type Error) and returns it as an error. -func (rsCB *RemoteStore) GetLastModified(path string) ([]byte, error) { +func (rsCB *RemoteStore) GetLastModified(path string) (string, error) { fn := func() js.Value { return rsCB.getLastModified(path) } v, err := exception.RunAndCatch(fn) if err != nil { - return nil, err + return "", err } - return utils.CopyBytesToGo(v), err + return v.String(), err } // GetLastWrite implements [bindings.RemoteStore.GetLastWrite() @@ -530,13 +530,13 @@ func (rsCB *RemoteStore) GetLastModified(path string) ([]byte, error) { // Returns: // - JSON of [bindings.RemoteStoreReport] (Uint8Array). // - Catches any thrown errors (of type Error) and returns it as an error. -func (rsCB *RemoteStore) GetLastWrite() ([]byte, error) { +func (rsCB *RemoteStore) GetLastWrite() (string, error) { fn := func() js.Value { return rsCB.getLastWrite() } v, err := exception.RunAndCatch(fn) if err != nil { - return nil, err + return "", err } - return utils.CopyBytesToGo(v), err + return v.String(), err } // ReadDir implements [bindings.RemoteStore.ReadDir]