Reverse argument order for sendTo

It makes more sense to put the address first then have the large
structure to send as the second argument to sendTo.  The opposite order
was originally chosen to be similar to that of sendto in BSD sockets.
This commit is contained in:
Hornwitser committed 2023-07-27 00:24:24 +02:00
1 parent 183d2921a8
commit 295cc7543a
24 files changed
+87 -74

No files matched your search

@@ -132,7 +132,8 @@ export default function InstanceViewPage(props) {
if (key === "export") {
setExportingData(true);
control.sendTo(
new libData.InstanceExportDataRequest(), { instanceId }
{ instanceId },
new libData.InstanceExportDataRequest(),
).catch(
notifyErrorHandler("Error exporting data")
).finally(() => {
@@ -141,12 +142,14 @@ export default function InstanceViewPage(props) {
} else if (key === "extract") {
control.sendTo(
new libData.InstanceExtractPlayersRequest(), { instanceId }
{ instanceId },
new libData.InstanceExtractPlayersRequest(),
).catch(notifyErrorHandler("Error extracting player data"));
} else if (key === "kill") {
control.sendTo(
new libData.InstanceKillRequest(), { instanceId }
{ instanceId },
new libData.InstanceKillRequest(),
).catch(notifyErrorHandler("Error killing instance"));
} else if (key === "delete") {