update lastConsentTermsOfUseDate instead of consentTermsOfUseDate

This commit is contained in:
Konstantinos Spyrou 2022-05-24 09:15:52 +00:00
parent 03dad9cb1e
commit 94a8b1abf9
2 changed files with 10 additions and 1 deletions

View File

@ -80,7 +80,7 @@ public class RepositoryController {
Repository repository = repositoryService.getRepositoryById(terms.getId());
repository.setConsentTermsOfUse(terms.getConsentTermsOfUse());
repository.setFullTextDownload(terms.getFullTextDownload());
repository.setConsentTermsOfUseDate(date);
repository.setLastConsentTermsOfUseDate(date);
repositoryService.updateRepository(repository, SecurityContextHolder.getContext().getAuthentication());
}
}

View File

@ -9,6 +9,7 @@ public class RepositoryTerms {
private Boolean consentTermsOfUse;
private Boolean fullTextDownload;
private Date consentTermsOfUseDate;
private Date lastConsentTermsOfUseDate;
public RepositoryTerms() {
}
@ -52,4 +53,12 @@ public class RepositoryTerms {
public void setConsentTermsOfUseDate(Date consentTermsOfUseDate) {
this.consentTermsOfUseDate = consentTermsOfUseDate;
}
public Date getLastConsentTermsOfUseDate() {
return lastConsentTermsOfUseDate;
}
public void setLastConsentTermsOfUseDate(Date lastConsentTermsOfUseDate) {
this.lastConsentTermsOfUseDate = lastConsentTermsOfUseDate;
}
}