Add delete save feature

Add command and web interface button to delete saves.
This commit is contained in:
Hornwitser committed 2021-06-01 16:32:58 +02:00
1 parent 2e314ff098
commit 35f54a0ee8
6 files changed
+96 -10

No files matched your search

+14
View File
@@ -429,6 +429,20 @@ instanceCommands.add(new libCommand.Command({
},
}));
instanceCommands.add(new libCommand.Command({
definition: ["delete-save <instance> <save>", "Delete a save from an instance", (yargs) => {
yargs.positional("instance", { describe: "Instance to delete save from", type: "string" });
yargs.positional("save", { describe: "Save to delete", type: "string" });
}],
handler: async function(args, control) {
let instanceId = await libCommand.resolveInstance(control, args.instance);
await libLink.messages.deleteSave.send(control, {
instance_id: instanceId,
save: args.save,
});
},
}));
instanceCommands.add(new libCommand.Command({
definition: ["export-data <instance>", "Export item icons and locale from instance", (yargs) => {
yargs.positional("instance", { describe: "Instance to export from", type: "string" });