Got character copying working

This commit is contained in:
Stefan Zermatten
2019-02-11 11:11:51 +02:00
parent 9d86cb8bee
commit 1ebb0d2527
6 changed files with 148 additions and 33 deletions

View File

@@ -16,7 +16,11 @@ Meteor.methods({
characterDump.character.writers = [];
characterDump.character.owner = userId;
// Rename the character so it's obviously a copy
characterDump.character.name += " - Copy";
// Write the character back to the database
restoreCharacter(characterDump);
return characterDump.character;
},
});