Skip to content

Commit

Permalink
#363 Increment in service instead of template
Browse files Browse the repository at this point in the history
  • Loading branch information
ahsanbagwan authored and Brutus5000 committed Sep 9, 2020
1 parent ed1b53e commit 64037c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/faforever/api/map/MapService.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public MapNameValidationResponse requestMapNameValidation(String mapName) {
.mapToInt(MapVersion::getVersion)
.max()
.orElse(1))
.orElse(1);
.orElse(2);

return MapNameValidationResponse.builder()
.displayName(mapNameBuilder.getDisplayName())
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/validate_map_metadata.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
.done(function (msg) {
$("#mapNameBlock").append('<table class="result">' +
'<tr class="alert alert-success"><th>Map name</th><td>' + msg.displayName + '</td></tr>' +
'<tr class="alert alert-success"><th>Next version</th><td>' + (parseInt(msg.nextVersion, 10) + 1) + '</td></tr>' +
'<tr class="alert alert-success"><th>Next version</th><td>' + msg.nextVersion + '</td></tr>' +
'<tr class="alert alert-success"><th>Folder name</th><td>' + msg.folderName + '</td></tr>' +
'<tr class="alert alert-success"><th>File names</th><td>' + Object.entries(msg.fileNames).map(arr => arr[1]).join(', ') + '</td></tr>' +
'</table>');
Expand Down

0 comments on commit 64037c0

Please sign in to comment.