Skip to content

Commit

Permalink
Change saved json from pretty-print to no formatting to minimize
Browse files Browse the repository at this point in the history
translation file size
  • Loading branch information
hirokiterashima committed Jan 30, 2024
1 parent ec18ae9 commit 8a5f80c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected void saveTranslations(Authentication auth,
@RequestBody ObjectNode translations) throws IOException {
User user = userService.retrieveUserByUsername(auth.getName());
if (projectService.canAuthorProject(project, user)) {
translateProjectService.saveTranslations(project, locale, translations.toPrettyString());
translateProjectService.saveTranslations(project, locale, translations.toString());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class TranslateProjectAPIControllerTest extends APIControllerTest {
public void saveTranslations_() throws Exception {
expect(userService.retrieveUserByUsername(TEACHER_USERNAME)).andReturn(teacher1);
expect(projectService.canAuthorProject(project1, teacher1)).andReturn(true);
translateProjectService.saveTranslations(project1, "es", "{ }");
translateProjectService.saveTranslations(project1, "es", "{}");
expectLastCall();
replay(projectService, translateProjectService, userService);
controller.saveTranslations(teacherAuth, project1, "es",
Expand Down

0 comments on commit 8a5f80c

Please sign in to comment.