Skip to content

Commit

Permalink
stop logging to actionlogrecord for dataset types #10517
Browse files Browse the repository at this point in the history
  • Loading branch information
pdurbin committed Aug 13, 2024
1 parent 867f548 commit 2fb4fa6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/main/java/edu/harvard/iq/dataverse/api/Datasets.java
Original file line number Diff line number Diff line change
Expand Up @@ -5147,7 +5147,6 @@ public Response addDatasetType(@Context ContainerRequestContext crc, String json
DatasetType saved = datasetTypeSvc.save(datasetType);
Long typeId = saved.getId();
String name = saved.getName();
actionLogSvc.log(new ActionLogRecord(ActionLogRecord.ActionType.Admin, "addDatasetType").setInfo("Dataset type added with id " + typeId + " and name " + name + "."));
return ok(saved.toJson());
} catch (WrappedResponse ex) {
return error(BAD_REQUEST, ex.getMessage());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package edu.harvard.iq.dataverse.dataset;

import edu.harvard.iq.dataverse.actionlogging.ActionLogRecord;
import edu.harvard.iq.dataverse.actionlogging.ActionLogServiceBean;
import edu.harvard.iq.dataverse.api.AbstractApiBean;
import jakarta.ejb.EJB;
import jakarta.ejb.Stateless;
import jakarta.inject.Named;
import jakarta.persistence.EntityManager;
Expand All @@ -23,9 +21,6 @@ public class DatasetTypeServiceBean {
@PersistenceContext
EntityManager em;

@EJB
ActionLogServiceBean actionLogSvc;

public List<DatasetType> listAll() {
return em.createNamedQuery("DatasetType.findAll", DatasetType.class).getResultList();
}
Expand Down Expand Up @@ -70,8 +65,6 @@ public DatasetType save(DatasetType datasetType) throws AbstractApiBean.WrappedR
}

public int deleteById(long id) throws AbstractApiBean.WrappedResponse {
actionLogSvc.log(new ActionLogRecord(ActionLogRecord.ActionType.Admin, "delete dataset type")
.setInfo(Long.toString(id)));
try {
return em.createNamedQuery("DatasetType.deleteById").setParameter("id", id).executeUpdate();
} catch (PersistenceException p) {
Expand Down

0 comments on commit 2fb4fa6

Please sign in to comment.