Added reason to add items to collections form.
This commit is contained in:
@@ -293,6 +293,7 @@ public class AdminResource extends AbstractResource {
|
||||
@POST
|
||||
public String addItemsToCollection(
|
||||
@FormParam("collectionType") String collectionType,
|
||||
@FormParam("reason") String reason,
|
||||
@FormParam("product") String product,
|
||||
@Context HttpServletRequest request) throws Exception {
|
||||
validateAdmin(request);
|
||||
@@ -302,7 +303,7 @@ public class AdminResource extends AbstractResource {
|
||||
Map<Player,CardCollection> playersCollection = _collectionManager.getPlayersCollection(collectionType);
|
||||
|
||||
for (Map.Entry<Player, CardCollection> playerCollection : playersCollection.entrySet())
|
||||
_collectionManager.addItemsToPlayerCollection(true, "Fixing league collection", playerCollection.getKey(), createCollectionType(collectionType), productItems);
|
||||
_collectionManager.addItemsToPlayerCollection(true, reason, playerCollection.getKey(), createCollectionType(collectionType), productItems);
|
||||
|
||||
return "OK";
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
<form method="POST" action="/gemp-lotr-server/admin/addItemsToCollection">
|
||||
Type: <input type="text" name="collectionType"><br/>
|
||||
Reason: <input type="text" name="reason"><br/>
|
||||
Product: <textarea rows="5" cols="20" name="product"></textarea><br/>
|
||||
<input type="submit" value="Add items to collection">
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user