"Send" method argument updated

Serialisation tag for server URL of ModelCard fixed
This commit is contained in:
Ralph Wessel
2024-09-19 10:20:03 +01:00
parent 95e0033d2a
commit 6f7bd66a2d
3 changed files with 9 additions and 6 deletions
@@ -11,7 +11,7 @@ using namespace speckle::utility;
/*--------------------------------------------------------------------
Default constructor
--------------------------------------------------------------------*/
Send::Send() : BridgeMethod{"Send", [&](UpdateArgs args) {
Send::Send() : BridgeMethod{"Send", [&](const SendArgs& args) {
run(args);
}} {}
@@ -2,6 +2,7 @@
#define CONNECTOR_INTERFACE_BRIDGE_SEND
#include "Active/Serialise/CargoHold.h"
#include "Active/Serialise/Item/Wrapper/ValueWrap.h"
#include "Connector/Interface/Browser/Bridge/Config/Arg/ConnectorConfig.h"
#include "Speckle/Interface/Browser/Bridge/BridgeMethod.h"
@@ -9,13 +10,15 @@ namespace connector::interfac::browser::bridge {
class ConnectorConfig;
///Argument for a JS call to update the configuration
using UpdateArgs = speckle::interfac::browser::bridge::JSArgType<speckle::utility::String>;
///Argument parameter for a string
using StringHold = active::serialise::CargoHold<active::serialise::ValueWrap<speckle::utility::String>, speckle::utility::String>;
///Argument type for this method
using SendArgs = speckle::interfac::browser::bridge::JSArgType<StringHold>;
/*!
JS Function class to retrieve the names of the methods supported by the bridge
JS Function class to send a specified model
*/
class Send : public speckle::interfac::browser::bridge::BridgeMethod<UpdateArgs, void> {
class Send : public speckle::interfac::browser::bridge::BridgeMethod<SendArgs, void> {
public:
// MARK: - Constructors
@@ -27,7 +27,7 @@ namespace {
Identity{"modelId"},
Identity{"projectId"},
Identity{"accountId"},
Identity{"serverURL"},
Identity{"serverUrl"},
Identity{"settings"},
Identity{"expired"},
};