Commit 4971a9db authored by Deep Dey's avatar Deep Dey

chore: remove mother image mandatory

parent 772d8ed4
......@@ -49,12 +49,16 @@ public class AdmissionFormDAOController {
)
);
if (formData.getMotherImage() != null) {
formData.setMotherImageName(
fileStorageService.storeFile(
formData.getMotherImage(),
settings.getImageStoragePath()
)
);
} else {
formData.setMotherImageName("mother.png");
}
Long id = admissionFormDataRepository.saveAdmissionFormData(formData);
formData.setId(id);
......
......@@ -91,7 +91,6 @@ public class AdmissionFormData {
@NotNull(message = "Father Image cannot be empty")
private MultipartFile fatherImage;
private String fatherImageName;
@NotNull(message = "Mother Image cannot be empty")
private MultipartFile motherImage;
private String motherImageName;
private String interactionDate;
......
......@@ -27,6 +27,10 @@ public class WebMvcConfig implements WebMvcConfigurer {
.addResourceHandler("/resources/**")
.addResourceLocations("file:" + settings.getStaticResourcesRootPath() + "/");
registry
.addResourceHandler("/resources/images/**")
.addResourceLocations("classpath:/static/images/");
registry.addResourceHandler("/static/**").
addResourceLocations("classpath:/static/");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment